Is it possible to use templates within templates?
For instance, I have the following two templates:
<HierarchicalDataTemplate
x:Key="RecursiveTemplate"
ItemsSource="{Binding Children}">
<StackPanel Margin="1" Orientation="Horizontal">
<Ellipse Fill="DarkGreen" Width="14" Height="14"/>
<TextBlock
...
Hello!
In my WPF project i want to have only one Window - MainWindow and UserControls as working part. I have some little different applications in one, and want to make navigation on top of my MainWindow as buttons. And little applications as UserControl. In MainWindow - grid with Big Empty Zone - which use to keep and run work. But, i ...
OK, let's say I am creating a program that will list users contacts in a ListBox on the left side of the screen. When a user clicks on the contact, a bunch of messages or whatever appears in the main part of the window.
Now my question is: how should the MVVM triads look? I have two models: Contact, and Message. The Contact model co...
My company is stuck on .Net 3.0. The task I am trying to tackle is simple, I need to bind the IsChecked property of the CheckBoxResolvesCEDAR to the CompletesCEDARWork in my Audio class. The more I read about this it appears that I have to declare CompletesCEDARWork as dependancy propert, but I can not find a good example of how this i...
I have a WPF canvas on which I'm dynamically creating objects from code. These objects are being transformed by setting the RenderTransform property, and an animation needs to be applied one of those transforms. Currently, I can't get properties of any transform to animate (although no exception gets raised and the animation appears to r...
I am using the WPF ToolKit DataGrid and trying to access the DataGrid's scrollable height. I have 26 rows in the DataGrid with a rowheight of 35. I traverse down the VisualTree starting at the DataGrid to find its ScrollViewer. However, the ScrollViewer's ScrollableHeight is 16.0.
Why is this number so low? I am expecting somewher...
How do you minimise a window programmatically when using windows wpf? I can seem to find a .resize attribute?
...
Hello,
in my ComboBox I see 3 times this: MyNameSpace.ViewModel.CustomerViewModel ??
Actually this code worked but now don`t know what I changed:
<ComboBox DisplayMemberPath="{Binding Path=CustomerName}" SelectedIndex="0" ItemsSource="{Binding CustomersViewModel}" />
Customers is a ObservableCollection
The same code works fi...
I am still new to c# and wpf This program is a clock with different view and I would like to use the context menu to change between view, but the error says that there is no definition or extension method for the events. Right now I have the event I'm working on popping up a MessageBox just so I know it has run, but I cannot get it to co...
If I want to create a button control like that, is it supposed to be a User Control or a Custom Control? I am not sure maybe something else? Ideally I want to be able style/animate the main button and the inner button separately; also obviously Ill need to process their events separately. These buttons will be created at run-time and ...
Before pointing me to http://stackoverflow.com/questions/1287820/have-a-wpf-window-inside-another-wpf-window
or telling me that MDI is soooo 1995, let me explain my application.
I'm creating a MessageBanner window that works similar to the message banner we see in several sites nowadays (including SO)
I want client code to call my mess...
I am learning vb.net, wpf and xaml with the help of sites like this one.
The project I am currently working on is a 4 x 4 slide puzzle.
I cannot get the buttons in the grid to scramble to start a new game when calling a new game event.
Any help will be greatly appreciated.
If no answer is can be provide, a good resource to research woul...
I am trying to create an effect similar to the Lights out /lights dim feature in Adobe Lightroom (http://www.youtube.com/watch?v=87hNd3vaENE) except in WPF.
What I tried was to create another window over-top of my existing window, make it transparent and put a semi transparent Path geometry on it. But I want mouse events to be able to ...
I have a details view window in WPF and a label may look like this.
<Label Content="{x:Static properties:Resources.Reference}" />
So that is obtains it content from my property Resource.
How can transform/format the content so it has a colon after each label item. e.g. instead of the content simply displaying Reference I want it t...
In a C# WPF program I'am trying to set the value of a HTML Text element which is defined:
<input name="tbBName" type="text" id="tbBName" tabindex="1" />
I tried the following:
mshtml.HTMLDocument doc = (mshtml.HTMLDocument)webBrowser1.Document;
mshtml.HTMLInputTextElement tbName = (mshtml.HTMLInputTextElement)doc.getElementsByName("t...
Did I miss something?
1- Style
<Style TargetType="{x:Type TextBox}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Validation.HasError}" Value="true">
<Setter Property="BorderBrush" Value="Blue" />
</DataTrigger>
</Style.Triggers>
<Setter Property="MinWidth" Value=...
Hi there
In a given binding is it possible to specify the path on the source object? Seems like this could a void a lot of trivial converters..
Imagine this..:
class foo
{
bool A
int B
}
<ComboBox ItemsSource="ListOfFoos" SelectedItem="{Binding number, SourcePath=B}" />
...
The chart area in the screenshot is a HwndHost control which hosts a native Win32 window (with it's own registered WNDCLASS) implemented in C++/CLI and drawn with Direct2D. The HwndHost is hosted in a WPF Border control.
The problem I have is that I can't set the keyboard focus to the hosted Win32 window. I want the focus to move to the...
I am using the WPF TreeView to display some hierarchical information. Each item in the TreeView consists of several attributes, so I am using a Grid within my HierarchicalDataTemplate to display these attributes:
<HierarchicalDataTemplate x:Key="ArtistTemplate"
ItemsSource="{Binding XPath=Title}"
ItemTemplate="{StaticResource Ti...
I've seen a lot of questions about the merits of WPF here, and essentially every answer says it's the bee's knees, but essentially every answer also talks about things like XAML, in many cases graphic designers and Expression Blend etc. My question is, is it worth getting into WPF if you're a solo coder working in C# only?
Specifically,...