|
namespace Edi.View.Pane
{
using System.Windows;
using System.Windows.Controls;
using Edi.ViewModel;
using Edi.ViewModel.Base;
class PanesStyleSelector : StyleSelector
{
public Style ToolStyle
{
get;
set;
}
public Style FileStyle
{
get;
set;
}
public Style RecentFilesStyle
{
get;
set;
}
public override System.Windows.Style SelectStyle(object item, System.Windows.DependencyObject container)
{
if (item is RecentFilesViewModel)
return RecentFilesStyle;
if (item is ToolViewModel)
return ToolStyle;
if (item is FileViewModel)
return FileStyle;
return base.SelectStyle(item, container);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
The Windows Presentation Foundation (WPF) and C# are among my favorites and so I developed
Edi
and a few other projects on
GitHub. I am normally an algorithms and structure type but WPF has such interesting UI sides that I cannot help myself but get into it.
https://de.linkedin.com/in/dirkbahle