I've got a MainResources.xaml file in which I have a style that defines how each of my windows in my application look:
<Style x:Key="MainBorderStyle" TargetType="{x:Type Border}">
<Setter Property="Background" Value="WhiteSmoke" />
<Setter Property="BorderBrush" Value="LightGray" />
<Setter Property="BorderThickness" Value...
In CSS the margin order is: top right bottom left
In XAML the margin order is: left top right bottom
Is there a reason why the WPF team didn't align this to the CSS norm?
...
I am using System.Addin to create plugins for a small portion of my application. I have two different plugins at the moment, and they are both detected and initialized correctly. I can even copy & paste the plugin folders that are created and I will see them appear as well.
Everything works great when I'm playing around in the debug a...
Hi there is possible to set a default language or set a new one in RichTextBox, i want to set it in "es-PE" for spellchecker propouses
Thanks!
...
I have a ComboBox in WPF which is databound, and has data template which controls how each of the items is displayed. I have made it so that each item is displayed with two bits of text (for the Name and Path properties) and one image (for the Icon property).
At the moment when I select an item from the ComboBox the textbox bit of the C...
I have a ListBox on a form that is bound to an ObservableCollection of a custom type. Within each item there is a ComboBox bound to an enumeration type. When the window loads, all ComboBoxes are defaulted to a certain value. When I change the SelectedItem for any one (from the UI, not from code), all other ComboBoxes change to the sam...
I am trying to display a correlation of multiple sets of events in real-time, using WPF. My current approach is to use the following classes:
class RTTimeline
{
public string Name { get; private set; }
public ObservableCollection<RTEvent> Events { get; private set; }
... more things here ...
}
class RTEvent
{
public dou...
I've got a ComboBox in WPF that I've mucked around with quite a lot (it has a custom template and a custom item template). I've got it to the point now where it is working pretty much how I want it, except that when I type into the ComboBox it is doing the filtering for me, but only filters assuming what I type starts the name of the ite...
I am using an ItemsControl bound to a CollectionViewSource. I set its ItemsPanel to a WrapPanel (with orientation initially set to horizontal) and am using a button to toggle between horizontal and vertical orientation. Basically changing the ItemsPanel to point at different resources, inside the button click handler. This works fine.
...
In Expression Blend you can create a font-size of say 18 and then create a "font-size resource".
Coming at this from HTML/CSS, I cannot think of when I would want to make a style for a "font-size" and one for a "font-style" and one for a "font-weight". Instead I want to make a font called "CompanyHeader" and have 10 different attributes...
I have the following code and basically what i am not able to figure out is how to clone the whole grid and make a blank copy of them side by side.... for a clear understanding this is something to do with hospital application and the grid is related to a pregnancy so when said 'ADD CHILD' button a whole new grid should be created during...
With reference to the Software Project I am currently working on.
I have the below methods that basically move a canvas with a Timer:
DispatcherTimer dt = new DispatcherTimer(); //global
public void Ahead(int pix)
{
var movx = 0;
var movy = 0;
dt.Interval = TimeSpan.FromMilliseconds(5);
...
Is it possible and a good idea to have user control (public MyControl: UserControl) which supports both ControlTemplates and existing content? I have understood that ControlTemplates should only be used when you inherit from Control (public MyControl: Control), but I found out that you can use them with UserControl too if your UserContro...
After reading how to keep your dev machine from slowing down, I was reminded of my good intention a year ago to build a VM for my development machine.
However, I'm developing WPF and SilverLight GUIs on Vista x64. I can run x64 versions of the OS under a VM but I'm concerned about graphic performance for WPF and especially running Expre...
Hello,
I'm planning to make an animation with Silverlight, i want to export the animation to a video format, to be able to share it on video sharing website.
How can i do this ?
...
Hi,
how can I define different ContextMenus for each column in the DataGrid (Microsoft's grid)? I found out that the grid provides a ContextMenu attribute, but i want different context menu items for the columns, not the same ContextMenu for the whole grid..
Thanks for any help on this!
Edit: Thanks for your answer! I tried to listen...
Currently I am using an ObservableCollection within a WPF application, the application is an implementation of Conway's Game of life and works well for about 500 cells but after that it begins to slow down significantly. I originally wrote the application using a HashSet but couldn't find any way to bind the cells to a canvas. Is there a...
Hi
I have a WPF listbox, with some custom item inside.
When user wants to deleta on of the item, what happens is that he has to reselect manually in the list rigth after delete because the list "seems" to lose focus OR no selected item exists.
Any idea ?
Thanks
Jonathan
...
We're creating a WPF custom control targeted at .NET 3.5. It is very compelling to use StringFormat property in bindings, but this was only added in SP1.
So the question is: how many potential users will we be cutting off by changing the requirement from .NET 3.5 to .NET 3.5 SP1? Or is it safe to assume that more or less every user who...
I don't konow how to set Path inside UserControl based on Parameter:
User control:
<UserControl x:Class="WpfApplication3.TestControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBa...