CommandParameter binding Introduction:
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>
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:的更多相关文章
- 背水一战 Windows 10 (24) - MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过非 ButtonBase 触发命令
[源码下载] 背水一战 Windows 10 (24) - MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过非 ButtonBase 触发命令 作者:webabcd ...
- 背水一战 Windows 10 (23) - MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过 ButtonBase 触发命令
[源码下载] 背水一战 Windows 10 (23) - MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过 ButtonBase 触发命令 作者:webabcd ...
- MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过 ButtonBase 触发命令
介绍背水一战 Windows 10 之 MVVM(Model-View-ViewModel) 通过 Binding 或 x:Bind 结合 Command 实现,通过 ButtonBase 触发命令 ...
- MVVM: 通过 Binding 或 x:Bind 结合 Command 实现,通过非 ButtonBase 触发命令
介绍背水一战 Windows 10 之 MVVM(Model-View-ViewModel) 通过 Binding 或 x:Bind 结合 Command 实现,通过非 ButtonBase 触发命令 ...
- MVVMlight框架应用:Data Binding、Command
常用Wpf开发中我们在ViewModel中实现INotifyPropertyChanged接口,通过触发PropertyChanged事件达到通知UI更改的目的:在MVVMLight框架里,这里我们定 ...
- WPF - MVVM - 如何将ComboBox的Selectchange事件binding到ViewModel
转:http://www.cnblogs.com/mantian/p/3713524.html 将所有的事件,属性,都映射到ViewModel中.好处多多,以后开发尽量用这种模式. 解决方法: 使用S ...
- WPF中ContextMenu通过CommandParameter传参
场景:ListBox中有个ContextMenu,希望点击其中一个菜单项的时候把ListBox当做CommandParameter传递给Command,但是发现无论是通过ElementName还是Re ...
- 【转】【WPF】WPF - MVVM - 如何将ComboBox的Selectchange事件binding到ViewModel
将所有的事件,属性,都映射到ViewModel中.好处多多,以后开发尽量用这种模式. 解决方法: 使用System.Windows.Interactivity.dll,添加该dll到项目引用 xmln ...
- [WPF]解决模板中ContextMenu绑定CommandParameter的问题
直接上代码,首先是一个ContextMenu的模板: <ContextMenu x:Key="Menu" BorderThickness="0.3" Fo ...
随机推荐
- html5的float属性超详解(display,position, float)(文本流)
html5的float属性超详解(display,position, float)(文本流) 一.总结 1.文本流: 2.float和绝对定位都不占文本流的位置 3.普通流是默认定位方式,就是依次按照 ...
- mysql 按日期分组
select DATE_FORMAT(NOW(),'%Y%m%d') days,count(caseid) count from tc_case group by days; //date_forma ...
- CentOS 7开放端口和关闭防火墙
开放端口 永久的开放需要的端口 sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent sudo firewall-cmd -- ...
- Git使用经验小结
2012春,开始正式使用SVN,2014年9月加入一起好后,开始使用Git. 有了一些使用经验,也看了下网上关于"Git全胜SVN"的言论. 结合自己的实际情况,简要写几句: 1 ...
- SPOJ4491. Primes in GCD Table(gcd(a,b)=d素数,(1<=a<=n,1<=b<=m))加强版
SPOJ4491. Primes in GCD Table Problem code: PGCD Johnny has created a table which encodes the result ...
- mui常用功能链接地址
1.下拉刷新mui.pullToRefresh插件http://ask.dcloud.net.cn/article/12152.打包app权限列表http://ask.dcloud.net.cn/ar ...
- [React Router v4] Use Regular Expressions with Routes
We can use regular expressions to more precisely define the paths to our routes in React Router v4. ...
- [NPM] Run a set of similar npm scripts with a wildcard
In this lesson we will run a set of scripts that are grouped together with a wildcard using the npm- ...
- ubuntu14.04下unix网络编程 环境的配置
在ubuntu下 首先:在unpv13e文件加下 ./configure cd lib make cd ../libfree make cd ../liggai make cd .. vim lib/ ...
- 小强的HTML5移动开发之路(30)—— JavaScript回顾5
一.查找 第一种方式:依据id查找 var obj = document.getElementById(id); //document是HTMLDocument的实例 <html> & ...