Hi everyone. I'm trying to do (in WPF):
Have an .exe file that displays the system menu icon (the icon in the upper left of the window) like normal
Not have this icon show up in modal windows called by this app
I tried the solution here:
http://stackoverflow.com/questions/2341230/removing-icon-from-a-wpf-window
And this worked. The...
I have a list of Parent objects that contain Children. Both Parents and Children have a Checked boolean property. These object are bound to an ItemsControl that displays the hierarchy.
I also have a "Show checked" checkbox that is one of my application settings that will determine the Visibility of the Items in the ItemsControl.
So b...
I have a user interface where a user can enter a value and that value is updated in the ViewModel (and eventually written back to a database).
This works fine if the a value is actually entered. But if you want to clear that value (i.e. set it to nothing) it doesn't seem to work.
So for example if it was 'dog' but I clear that text ...
I've been working on a WPF application. Since I design the UI in Expression Blend 4 and work on the code-behind part in Visual Studio 2010, I constantly switch from one tool to another.
I added some Image controls to an existing Grid and assigned some images to them. In Blend, I built the project and ran it. Worked just fine. When I swi...
My WPF application consists of a main window with a tab control which has a series of tab items, each hosting a user control.
I'd like one of the user controls to be able to trigger the application to change focus from the current tab to a different one.
Is there a way for the user control to trigger its tab control container to chan...
How to best utilize the new Type Equivalance features to host the MapPoint Control in a WPF Application.
This is related to my other question about what is entailed as far as maintaining interop assembleis with regard to the new NoPIA and Type Equivalance features. But now I'm interested in actually getting a working implementation to s...
I found some freeware XAML icons that are perfect for my Silverlight project online (http://www.grafile.com/Product_Page.aspx?id=1.36), but these happen to be using WPF XAML, which is not compatible with Silverlight (at least as of version 4). Can anyone recommend a tool for converting from WPF XAML to Silverlight equivalent?
Thanks!
...
I am trying to apply a style to a text box when the content is not valid.
The following style works:
<Style x:Key="textBoxNormalStyle" TargetType="{x:Type TextBox}">
<Setter Property="FontFamily" Value="Arial"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="ForceCursor" Value="False"/>
<Setter Property...
I have a grid layout that splits a view into two parts, effectively for two sets of headings and list. I want each list to share the height of the active view evenly so I've used proportional sizing:
In the case where both lists exceed the height available this works just fine. However, if the top list only has 1 or two items, it s...
I have a ListBox, an IEnumerable is the data source. When a ListBoxItem is clicked, I want access to that object so I can grab some data and show another window.
Here is my ListBox XAML
`<ListBox Name="listBox1" Margin="0" Width="1010" Height="275" BorderThickness="0" BorderBrush="{x:Null}" Cursor="Arrow" HorizontalAlignment...
Is there a way to draw/fit a simple Quadrilateral cut-out from an image onto a standard axis-aligned rectangle for screen display. (So that the cut-out will be distorted to fill the rectangle points). Seems to me it should be possible with an ImageBrush but I cannot quite see it.
...
To give the ability to display and edit Richtext (Xaml) inside a treeview item,I have used a bindable Richtextbox (custom user control that used a richtextbox) to the HierachicalDataTemplate that used to populate the TreeViewItems.
This works fine but at the same time I want to have the drag and grop functionality in the treeview. My p...
I have a form that is generated based on several DataTemplate elements. One of the DataTemplate elements creates a TextBox out of a class that looks like this:
public class MyTextBoxClass
{
public object Value { get;set;}
//other properties left out for brevity's sake
public string FormatString { get;set;}
}
I need a way to "...
I have a control for which i want to declare resources in a xaml file. if this was a user control i could put the resources in an <UserControl.Resources> block and reference them in the code via this.Resources["myResourceKey"] how do i achieve the same functionality in a control. at the moment the only link to xaml i have is through the ...
I want to only allow my WPF window to be resized horizontally.
How best can I achieve this?
...
I'm a starter in WPF, and there's something I can't seem to figure out.
I have a checkbox that I would like to disable when a radio button is not selected.
my current syntax is:
<CheckBox IsEnabled="{Binding ElementName=rbBoth, Path=IsChecked}">Show all</CheckBox>
So basically, I want IsEnabled to take the opposite value than the bin...
I have some code which is (supposed to be) capturing keystrokes. The top level window has a
Keyboard.PreviewKeyDown="Window_PreviewKeyDown"
clause and the backing CS file contains:
private void Window_PreviewKeyDown(object sender, KeyEventArgs e) {
if (e.KeyboardDevice.Modifiers == ModifierKeys.Control) {
switch (e.Key) {...
If you need to access a WPF control from the code behind, you need to supply a Name attribute to it in XAML.
In many cases, you don't need to access controls from the code behind, since a lot of coding logic such as binding is better applied directly inside XAML.
My question is: Is there a performance gain from not supplying the name a...
I know Kernighan & Ritchie were the inventors of C and so I bought their book, I know Don Box was "the man" behind COM and so I bought his book "Essential COM".
Now I want to learn WPF, who are the architects/designers of WPF?
Charles Petzold? Chris Anderson?
...
Hi,
I have created a custom ItemsControl called Toolbox. I want to be able to display images in that Toolbox - it is a part of a diagram designer.
My xaml looks like this:
<d:Toolbox ItemsSource="{Binding}">
<ItemsControl.ItemTemplate>
<DataTemplate>
...