I'm using a DataTemplate that animates a RenderTransform to increase its size when the mouse is over it. The problem I'm having is that when the animation is in effect the enlarged list box item appears behind other items. Is there a way to control the ZIndex of the list box item from within my DataTemplate so that it's always on top of ...
I'm having some issues trying to change the look / style of a combo box in Expression Blend / WPF. While there are tutorials out there describing setting styles for buttons, there seem to be a few wrinkles with ComboBox controls.
Can anyone offer any advice, or point me towards good tutorials that cover re-styling something more comple...
Hi there,
I've found this article by Bea Stollnitz and downloaded the source and converted to vb.net. I believe I have my conversion complete, but one thing is still not working as I've tried to get it and pulled too many hairs out. Hopefully someone can help me spot what I'm missing.
Ok, drag & drop works fine in the converted code,...
I would like to put my ScrollViewer in such a way that it overlaps/sits on top of the content it scrolls. I would set the Opacity of the ScrollViewer so that the content is visible underneath.
As far as I understand the default ScrollViewer, this doesn't seem to be possible out of the box since the content is nested inside the ScrollVie...
I am using media element to render video in WPF. All videos are working fine except H.264 videos. They have some stuttering problem while they are rendered on screen. My machine configuration is much more than the recommended requirement to play for this video. Another surprising fact is that the video renders perfectly fine when I play ...
I've got a rather funny problem with WPF. I have a tree-view, and selecting items works fine so far. The problem is, I want to unselect the currently selected item when the user clicks inside the blank area of the treeview. By default, the treeview keeps the current item selected, and I have added a context-menu option to deselect it, wh...
The LoadIt() method below takes 5-10 seconds to complete.
I want the message area to display "Loading..." before LoadIt() starts and display "Reloaded" after it finishes.
How can I do that?
The following code doesn't work. It seems to not update the label until everything is finished, at which point it just displays "Reloaded" again.
...
Howdy,
I have a data template that is defined in a XAML file. The root of the XAML is not a resource dictionary but the data template itself. Now I want to add this data template to the resources of a control. Unfortunately, I don't know what key to use.
myControl.Resources.Add(???, dataTemplate);
Although I use the data templates Da...
When a user clicks on an ListBoxItem, I want to it to be
bold
larger
font red
background yellow
Everything works except the background.
It seems that there is a standard (blue) background for selection.
How do I override that and change the selected background yellow?
Here is the code:
<Window x:Class="AlternateListBox2.Window1"
x...
I'm looking for a WPF cheat sheet that has the WPF markup extensions for binding, resources, and other common things in WPF.But so far I've had trouble finding it.
Anyone know where I could find one?
Thanks
Edit:
Thanks to John and Nir for creating two WPF cheat sheets and posting them here
John's XAML for WPF CheatSheet 1.0 (Draft...
Hi ,
I have WPF listview bound to collection of objects. Objects are continuously added in to collection from remote server and same is reflecting in to listview. Now we have requirement that we should be able to freeze listview for some time,
That is objects should still get added in to collection but should not appe...
Is there an easy way to tell a Two-way WPF data binding to wait a few milliseconds after the last change before updating the Source with the new property value?
I'm implementing a filter feature for a ListBox where I have a textbox, and I want to filter the content of the ListBox according to what I type. I'm using data binding to conne...
I need to be able to fill a stackpanel with buttons but the buttons must appear at the bottom of the stackpanel first and populate upwards. The buttons are created dynamically and there's an unknown number of them so visual hackery just won't work. I've tried experimenting with vertical alignments but to no avail.
Thanks in advance.
...
This question is inspired by this recent question and other situations I've encountered in my WPF development. How do I know whether it is enough to set a style on a control to override some default behavior vs creating a new control template?
More concretely, in the question above, the author wants to change the look of a ListBoxItem w...
I have created a custom window set to windowStyle="none", (no title or maximize - minimize buttons) and i am trying to implement a DragMove operation when the user clicks and drags on a grid. (by using DragMove on a MouseLeftButtonDown Handler)
First weird issue that this event nevers gets fired if the grid has no backround.
Adding so...
I dont think this is quite possible, but its worth a shot to see what you guys say. I am trying to create a half-elliptical button in C# (not XAML, that might through another curve ball). If I wanted a pre-determined size for the buttons, I would just use images or something like that, but thats not the case since the size changes. Here ...
I have a UserControl that contains a TreeView. I want the user to be able to set the properties of the inner TreeView control via XAML and I'm not sure how to do that.
I've tried creating a public property on the UserControl to the TreeView, but that only allows me to set a SelectedItemChanged trigger.
I'd like to do something like:
...
Using the locbaml method, I've created a new resource dll and am trying to programatically change the CurrentCulture and CurrentUICulture on the fly, but it doesn't seem to be working.
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("ar-SA");
System.Threading.Thread.CurrentThread.CurrentUICulture = ci;
Syste...
How do I make a control fill the whole cell in a ListView (with a GridView)? I've played around with various properties, but the control is always it's minimum size.
Here's my xaml.
<Window x:Class="ListViewUserControlTest.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.c...
This has happened repeatedly on various machines in VS2008 and Visual C# 2008.
I create an XBAP appliation.
I click the green arrow and it works.
I click Build/Publish and publish it to either a website or folder, it works.
I make some changes, publish again, and I just get a white screen. Both browsers, can restart, always blank.
I...