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. html js 上传图片 预览

    第一段代码是我自己修改之后能够多选显示多预览图,也就是加了个循环,后面的代码是一些解释说明之类的,抄的 <!DOCTYPE html> <html> <head> ...

  2. 在VS2015中用C++创建DLL并用C++调用且同一时候实现对DLL的调试

    一:用C++创建DLL            依照[在VS2015中用C++编写可被其他语言调用的动态库DLL]提示创建C++编写的DLL.或參考[在VS2015中用C++创建DLL并用C#调用且同一 ...

  3. 【37.07%】【UESTC 360】Another LCIS

    Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others) Submit  Status F ...

  4. [React Router v4] Parse Query Parameters

    React Router v4 ignores query parameters entirely. That means that it is up to you to parse them so ...

  5. 图标插件--jqplot实现柱状图及饼图,表盘图演示样例

    柱状图 在jqPlot图表插件使用说明(一)中,我们已经能够通过jqPlot绘制出比較简单的线形图.通过查看源码.我们也能够看出,线形图是jqPlot默认的图表类型: /** * Class: Ser ...

  6. Oracle成长点点滴滴(2)— 权限管理

    权限管理中权限包含系统权限以及对象权限.在解说权限管理之前我们先来了解用户的创建以及授权这些前提. 1.      创建用户以及授权 Ø  默认用户 既然提到了创建用户,首先必须先把用户的知识攻克了. ...

  7. [.NET Core 32]升级vs code之后,vs code无法调试net core web项目

    错误提示&处理方法 参考链接:https://github.com/OmniSharp/omnisharp-vscode/issues/1742 错误:The .NET Core debugg ...

  8. [Angular] Content Projection with ng-content

    For example there is tow form compoennts on the page, and what we want to do is reusing the form com ...

  9. erlang抽象码与basho的protobuf

    erlang抽象码与basho的protobuf(一)使用 erlang抽象码与basho的protobuf(二)代码生成原理之词法与语法分析 erlang抽象码与basho的protobuf(三)代 ...

  10. ets学习

    http://diaocow.iteye.com/blog/1768647 http://www.cnblogs.com/me-sa/archive/2011/08/11/erlang0007.htm ...