文件名称:WPFSimpleChromeWindow
- 所属分类:
- 界面编程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 77kb
- 下载次数:
- 0次
- 提 供 者:
- J***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
在WPF中模拟ChildWindow效果
原理很简单,关键点就是如何定义ChildWindow样式和使用DataTemplate动态显示控件,注意这里Content并没有显式定义ItemTemplate,它会默认应用资源里的DataTemplate定义,通过绑定到DialogViewModel,DataTemplate会根据DialogViewModel的DataType类型选择显示不同的子窗体,同时子窗体的DataContext会自动关联到该DialogViewModel类型的实体-In WPF, the principle is very simple simulation of the effect ChildWindow, ChildWindow key point is how to define the dynamic styles and use a DataTemplate to display control, attention here is not explicitly defined Content ItemTemplate, it will default application resources in the DataTemplate to define, by binding to DialogViewModel, DataTemplate DataType of the type according to DialogViewModel choose to display different sub-forms, while the child form' s DataContext will be automatically associated with the types of entities that DialogViewModel
原理很简单,关键点就是如何定义ChildWindow样式和使用DataTemplate动态显示控件,注意这里Content并没有显式定义ItemTemplate,它会默认应用资源里的DataTemplate定义,通过绑定到DialogViewModel,DataTemplate会根据DialogViewModel的DataType类型选择显示不同的子窗体,同时子窗体的DataContext会自动关联到该DialogViewModel类型的实体-In WPF, the principle is very simple simulation of the effect ChildWindow, ChildWindow key point is how to define the dynamic styles and use a DataTemplate to display control, attention here is not explicitly defined Content ItemTemplate, it will default application resources in the DataTemplate to define, by binding to DialogViewModel, DataTemplate DataType of the type according to DialogViewModel choose to display different sub-forms, while the child form' s DataContext will be automatically associated with the types of entities that DialogViewModel
(系统自动生成,下载前可以参看下载内容)
下载文件列表
SimpleWindowChrome
..................\CustomControl
..................\.............\bin
..................\.............\...\Debug
..................\.............\CaptionButton.cs
..................\.............\CloseButton.cs
..................\.............\CustomChromeWindow.cs
..................\.............\CustomControl.csproj
..................\.............\CustomControl.csproj.user
..................\.............\HelpButton.cs
..................\.............\Images
..................\.............\......\close.png
..................\.............\......\maximize.png
..................\.............\......\minimize.jpg
..................\.............\......\restore.png
..................\.............\MaximizeButton.cs
..................\.............\MinimizeButton.cs
..................\.............\obj
..................\.............\...\Debug
..................\.............\...\.....\CaptionButtons.g.i.cs
..................\.............\...\.....\CaptionButtonsWithHelp.g.i.cs
..................\.............\...\.....\CustomChormeWindow.g.i.cs
..................\.............\...\.....\CustomControl_MarkupCompile.i.cache
..................\.............\...\.....\CustomControl_MarkupCompile.i.lref
..................\.............\...\.....\DesignTimeResolveAssemblyReferences.cache
..................\.............\...\.....\DesignTimeResolveAssemblyReferencesInput.cache
..................\.............\...\.....\GeneratedInternalTypeHelper.g.i.cs
..................\.............\...\.....\TempPE
..................\.............\...\.....\......\Properties.Resources.Designer.cs.dll
..................\.............\...\.....\Themes
..................\.............\Properties
..................\.............\..........\AssemblyInfo.cs
..................\.............\..........\Resources.Designer.cs
..................\.............\..........\Resources.resx
..................\.............\..........\Settings.Designer.cs
..................\.............\..........\Settings.settings
..................\.............\Themes
..................\.............\......\CustomWindowGeneric.xaml
..................\.............\......\Generic.xaml
..................\SimpleWindowChrome
..................\SimpleWindowChrome.sln
..................\SimpleWindowChrome.suo
..................\..................\App.xaml
..................\..................\App.xaml.cs
..................\..................\bin
..................\..................\...\Debug
..................\..................\...\.....\SimpleWindowChrome.vshost.exe
..................\..................\...\.....\SimpleWindowChrome.vshost.exe.manifest
..................\..................\MainWindow.xaml
..................\..................\MainWindow.xaml.cs
..................\..................\obj
..................\..................\...\x86
..................\..................\...\...\Debug
..................\..................\...\...\.....\App.g.i.cs
..................\..................\...\...\.....\DesignTimeResolveAssemblyReferences.cache
..................\..................\...\...\.....\DesignTimeResolveAssemblyReferencesInput.cache
..................\..................\...\...\.....\MainWindow.g.i.cs
..................\..................\...\...\.....\SimpleWindowChrome_MarkupCompile.i.cache
..................\..................\...\...\.....\TempPE
..................\..................\...\...\.....\......\Properties.Resources.Designer.cs.dll
..................\..................\...\...\.....\Window1.g.i.cs
..................\..................\...\...\.....\Window2.g.i.cs
..................\..................\...\...\.....\Window3.g.i.cs
..................\..................\Properties
..................\..................\..........\AssemblyInfo.cs
..................\..................\..........\Resources.Designer.cs
..................\..................\..........\Resources.resx
..................\..................\..........\Settings.Designer.cs
..................\..................\..........\Settings.settings
.................
..................\CustomControl
..................\.............\bin
..................\.............\...\Debug
..................\.............\CaptionButton.cs
..................\.............\CloseButton.cs
..................\.............\CustomChromeWindow.cs
..................\.............\CustomControl.csproj
..................\.............\CustomControl.csproj.user
..................\.............\HelpButton.cs
..................\.............\Images
..................\.............\......\close.png
..................\.............\......\maximize.png
..................\.............\......\minimize.jpg
..................\.............\......\restore.png
..................\.............\MaximizeButton.cs
..................\.............\MinimizeButton.cs
..................\.............\obj
..................\.............\...\Debug
..................\.............\...\.....\CaptionButtons.g.i.cs
..................\.............\...\.....\CaptionButtonsWithHelp.g.i.cs
..................\.............\...\.....\CustomChormeWindow.g.i.cs
..................\.............\...\.....\CustomControl_MarkupCompile.i.cache
..................\.............\...\.....\CustomControl_MarkupCompile.i.lref
..................\.............\...\.....\DesignTimeResolveAssemblyReferences.cache
..................\.............\...\.....\DesignTimeResolveAssemblyReferencesInput.cache
..................\.............\...\.....\GeneratedInternalTypeHelper.g.i.cs
..................\.............\...\.....\TempPE
..................\.............\...\.....\......\Properties.Resources.Designer.cs.dll
..................\.............\...\.....\Themes
..................\.............\Properties
..................\.............\..........\AssemblyInfo.cs
..................\.............\..........\Resources.Designer.cs
..................\.............\..........\Resources.resx
..................\.............\..........\Settings.Designer.cs
..................\.............\..........\Settings.settings
..................\.............\Themes
..................\.............\......\CustomWindowGeneric.xaml
..................\.............\......\Generic.xaml
..................\SimpleWindowChrome
..................\SimpleWindowChrome.sln
..................\SimpleWindowChrome.suo
..................\..................\App.xaml
..................\..................\App.xaml.cs
..................\..................\bin
..................\..................\...\Debug
..................\..................\...\.....\SimpleWindowChrome.vshost.exe
..................\..................\...\.....\SimpleWindowChrome.vshost.exe.manifest
..................\..................\MainWindow.xaml
..................\..................\MainWindow.xaml.cs
..................\..................\obj
..................\..................\...\x86
..................\..................\...\...\Debug
..................\..................\...\...\.....\App.g.i.cs
..................\..................\...\...\.....\DesignTimeResolveAssemblyReferences.cache
..................\..................\...\...\.....\DesignTimeResolveAssemblyReferencesInput.cache
..................\..................\...\...\.....\MainWindow.g.i.cs
..................\..................\...\...\.....\SimpleWindowChrome_MarkupCompile.i.cache
..................\..................\...\...\.....\TempPE
..................\..................\...\...\.....\......\Properties.Resources.Designer.cs.dll
..................\..................\...\...\.....\Window1.g.i.cs
..................\..................\...\...\.....\Window2.g.i.cs
..................\..................\...\...\.....\Window3.g.i.cs
..................\..................\Properties
..................\..................\..........\AssemblyInfo.cs
..................\..................\..........\Resources.Designer.cs
..................\..................\..........\Resources.resx
..................\..................\..........\Settings.Designer.cs
..................\..................\..........\Settings.settings
.................