Design Patterns SampleCode

https://csharpdesignpatterns.codeplex.com/

DevExpress Support Center

https://www.devexpress.com/

DevExpress Center

http://www.devexpress.com/Support/Center/Question/Details/T129527

mvc mvp mvvm comparision

http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/DPR305

<Window x:Class="OddEvenRows.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Height="400" Width="300"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" Title="JackSlater" x:Name="jackWindow">
<Window.Resources>
<FrameworkElement x:Key="ProxyElement" DataContext="{Binding Path=.,ElementName=noTB01}"/>
</Window.Resources>
<StackPanel>
<ContentControl Visibility="Collapsed" Content="{StaticResource ProxyElement}"/>
<StackPanel>
<TextBlock x:Name="noTB01" Text="No.1"></TextBlock>
<TextBlock x:Name="noTB02" Text="No.2"></TextBlock>
<Button x:Name="testBtn" Content="Hello"></Button>
</StackPanel>
<Grid>
<dxg:GridControl x:Name="gridControl" Grid.Row="2" MaxHeight="500" ItemsSource="{Binding MyList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Index">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<dxe:ComboBoxEdit Name="PART_Editor" IsTextEditable="False" >
<dxe:ComboBoxEditItem x:Name="readyCombox" Content="ClickDownComboxItem">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseDown">
<cmd:EventToCommand
Command="{Binding Path=View.DataContext.ImportCommand}"
CommandParameter="{Binding Path=DataContext.Text, Source={StaticResource ProxyElement}}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</dxe:ComboBoxEditItem>
</dxe:ComboBoxEdit>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True"/>
</dxg:GridControl.View>
</dxg:GridControl>
</Grid>
</StackPanel>
</Window>
<Window x:Class="OddEvenRows.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Height="400" Width="300"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" Title="JackSlater" x:Name="jackWindow">
<dxg:GridControl x:Name="gridControl" ItemsSource="{Binding MyList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Index">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<dxe:ComboBoxEdit EditValue="{Binding Data.Index,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" IsTextEditable="False" >
<dxe:ComboBoxEditItem x:Name="readyCombox" Content="ClickDownComboxItem">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseDown">
<cmd:EventToCommand
Command="{Binding Path=View.DataContext.ImportCommand}"
CommandParameter="{Binding Path=View.DataControl.Parent}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</dxe:ComboBoxEditItem>
</dxe:ComboBoxEdit>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True"/>
</dxg:GridControl.View>
</dxg:GridControl>
</Window>
<Window x:Class="OddEvenRows.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Height="400" Width="300"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" Title="JackSlater" x:Name="jackWindow">
<Window.Resources>
<!--<FrameworkElement x:Key="ProxyElement" DataContext="{Binding noTB01}"/>-->
<TextBlock x:Key="ProxyElement" DataContext="{Binding Path=.,ElementName=noTB01}"/>
</Window.Resources>
<StackPanel>
<ContentControl Visibility="Collapsed" Content="{StaticResource ProxyElement}"/>
<StackPanel>
<TextBlock x:Name="noTB01" Text="No.1"></TextBlock>
<TextBlock x:Name="noTB02" Text="No.2"></TextBlock>
<Button x:Name="testBtn" Content="Hello"></Button>
</StackPanel>
<Grid>
<dxg:GridControl x:Name="gridControl" Grid.Row="2" MaxHeight="500" ItemsSource="{Binding MyList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Index">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<dxe:ComboBoxEdit Name="PART_Editor" IsTextEditable="False" >
<dxe:ComboBoxEditItem x:Name="readyCombox" Content="ClickDownComboxItem">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseDown">
<cmd:EventToCommand
Command="{Binding Path=View.DataContext.ImportCommand}"
CommandParameter="{Binding Path=DataContext.Text,Source={StaticResource ProxyElement}}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</dxe:ComboBoxEditItem>
</dxe:ComboBoxEdit>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True"/>
</dxg:GridControl.View>
</dxg:GridControl>
</Grid>
</StackPanel>
</Window>

http://www.thomaslevesque.com/2011/03/21/wpf-how-to-bind-to-data-when-the-datacontext-is-not-inherited/

http://stackoverflow.com/questions/7660967/wpf-error-cannot-find-govering-frameworkelement-for-target-element

http://stackoverflow.com/questions/7660967/wpf-error-cannot-find-govering-frameworkelement-for-target-element

DevExpressCenter:

http://www.devexpress.com/Support/Center/Question/Details/T129527

Messenger.Default.Send<long>(runId);

Messenger.Default.Register<int>(this,
(craneRptDate) =>
{
Task.Factory.StartNew(
() =>
{
IsProgressBarIndicatorBusy = true;
try
{
AccessCraneDataDetailsByWebService(craneRptDate);
}
catch (Exception ex)
{
logger.Error("Access CraneDataDetails By WebService Error", ex);
MessageBox.Show("AccessCraneDataDetailsByWebService: " + ex.Message);
}
IsProgressBarIndicatorBusy = false;
});
});

CommandParameter binding Introduction:的更多相关文章

  1. 背水一战 Windows 10 (24) - MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过非 ButtonBase 触发命令

    [源码下载] 背水一战 Windows 10 (24) - MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过非 ButtonBase 触发命令 作者:webabcd ...

  2. 背水一战 Windows 10 (23) - MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过 ButtonBase 触发命令

    [源码下载] 背水一战 Windows 10 (23) - MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过 ButtonBase 触发命令 作者:webabcd ...

  3. MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过 ButtonBase 触发命令

    介绍背水一战 Windows 10 之 MVVM(Model-View-ViewModel) 通过 Binding 或 x:Bind 结合 Command 实现,通过 ButtonBase 触发命令 ...

  4. MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过非 ButtonBase 触发命令

    介绍背水一战 Windows 10 之 MVVM(Model-View-ViewModel) 通过 Binding 或 x:Bind 结合 Command 实现,通过非 ButtonBase 触发命令 ...

  5. MVVMlight框架应用:Data Binding、Command

    常用Wpf开发中我们在ViewModel中实现INotifyPropertyChanged接口,通过触发PropertyChanged事件达到通知UI更改的目的:在MVVMLight框架里,这里我们定 ...

  6. WPF - MVVM - 如何将ComboBox的Selectchange事件binding到ViewModel

    转:http://www.cnblogs.com/mantian/p/3713524.html 将所有的事件,属性,都映射到ViewModel中.好处多多,以后开发尽量用这种模式. 解决方法: 使用S ...

  7. WPF中ContextMenu通过CommandParameter传参

    场景:ListBox中有个ContextMenu,希望点击其中一个菜单项的时候把ListBox当做CommandParameter传递给Command,但是发现无论是通过ElementName还是Re ...

  8. 【转】【WPF】WPF - MVVM - 如何将ComboBox的Selectchange事件binding到ViewModel

    将所有的事件,属性,都映射到ViewModel中.好处多多,以后开发尽量用这种模式. 解决方法: 使用System.Windows.Interactivity.dll,添加该dll到项目引用 xmln ...

  9. [WPF]解决模板中ContextMenu绑定CommandParameter的问题

    直接上代码,首先是一个ContextMenu的模板: <ContextMenu x:Key="Menu" BorderThickness="0.3" Fo ...

随机推荐

  1. thinkphp5项目--练手--企业单车网站(九)(友情链接)

    thinkphp5项目--练手--企业单车网站(九)(友情链接) 项目地址 fry404006308/BicycleEnterpriseWebsite: Bicycle Enterprise Webs ...

  2. [内核编程] Windebug双机调试环境搭建

    Windebug双机调试环境搭建    开始进行内核编程/驱动编程的调试工作是非常烦人的,由于程序运行与内核层不受操作系统的管控,所以容易引起主机蓝屏和崩溃是常有的事.这也就使得内核程序的调试成了一大 ...

  3. request与response对象详述

    request与response对象. 1. request代表请求对象 response代表的响应对象. 学习它们我们可以操作http请求与响应. 2.request,response体系结构. 在 ...

  4. Android JNI--基础篇(二)

    编写一个可以与C代码交互的android工程需要如下步骤: 1.JAVA代码中写声明native 方法 2. 创建jni目录,编写c代码,方法名字要对应 3.编写Android.mk文件(交叉编译的规 ...

  5. C/C++ 变量的初始化

    局部变量,初始化为垃圾值,局部静态变量初始化为 0: 1. 二维数组 // 作为局部变量 int arr[4]; // 全是垃圾值 int arr[4] = {1}; // 第一个元素为 1,其他默认 ...

  6. Spring MVC--@RequestMapping

    2.1 @RequestMapping @RequestMapping是SpringMVC的核心注解,负责访问的url与调用方法之间的映射; @RequestMapping可以放在类和方法上; @Re ...

  7. Everything starts with a dream(A day has only 24 hours and these things take time,所以要抓紧)

    There is the famous quote: "Everything starts with a dream" and many years ago, Michael Va ...

  8. 小强的HTML5移动开发之路(38)——jqMobi插件ActionSheet

    现在在手机客户端上Action Sheet非常常见,比如微信中的分享按钮菜单,下面我们使用jqMobi实现一个Action Sheet,如下: 首先右击上面的按钮选择审查元素(我用的是Chrome浏览 ...

  9. 【非常高%】【codeforces 733B】Parade

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...

  10. 寄存器,cache、伙伴系统、内存碎片、段式页式存储管理

    cache.伙伴系统.内存碎片.段式页式存储管理 目录 分层的存储管理 cache 局部性原理 置换算法 写回策略 linux环境下的cache 连续内存分配与内存碎片 内部碎片与外部碎片 动态分区分 ...