I'm writing a very basic WPF dialog and want to apply a simple style to all objects that inherit from the Control class. The code I'm using:
<Window.Resources>
<Style TargetType="{x:Type Control}">
<Setter Property="Margin" Value="20"/>
</Style>
</Window.Resources>
<StackPanel>
<TextBlock Text="some text"/>
<Tex...
I'm using one of the themes in CodePlex and I want to add some modifications on the style but not to change their code. How can I inherit the theme style?
...
I'm going to be driving a touch-screen application (not a web app) that needs to present groups of images to users. The desire is to present a 3x3 grid of images with a page forward/backward capability. They can select a few and I'll present just those images.
I don't see that ListView does quite what I want (although WPF is big enoug...
How do I bind an element of a derived <UserControl> to an element of the base <UserControl>?
I have defined a UserControl called Tile as my base class. This would be an abstract base class, if XAML wouldn't balk when I tried to instantiate an object derived from it ...
Anyway, so far Tile only contains a single dependency property:...
I have a tabcontrol binded the an observable list. Eveything look to be perfect until I select a tab. Once selected, the tab doesn't lost its focus and the selected tab is not available. They are not any message in the Output Window.
Here is a screen shot just before clicking the tab:
And here is a screen shot after (with the problem...
Hi,
I'm playing with the integrated spell check in WPF.
I need to configure it dynamically from code behind, not just in XAML. XAML solution works perfectly (SpellCheck.IsEnabled=true + xml:lang attribute).
However if I try to enable spell check using this code snippet, it is not working:
Thread.CurrentThread.CurrentCulture = new Cul...
Here's the Window declaration:
<Window
x:Class="Pse.ExperimentBase.SplashWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource _windowStyle}"
WindowStartupLocation="CenterScreen"
WindowStyle="None">
Here's the Styl...
I have a bunch of data points that I would like to two-way bind to points on a canvas.
The points assume larger y values are reflected in an upwards direction like most math graphs.
How do I change the x,y origin of the canvas to the bottom left corner and reverse it's interpretation of the y coordinate?
(I would like to stay in XAML)...
Hello,
I want to draw Bitmap image using the xaml.
Could some one please help me out in this regards as I am very new to XAML?
Thanks in Advance,
Ravi Naik.
...
I need to store the bitmap image information in Xaml formated file.
Can any one pls help me out on this regard?
Thanks in advance.
Ravi Naik
...
I currently define the background for a user control like this:
<UserControl.Background>
<ImageBrush ImageSource="{DynamicResource LeftMenuBackgroundImage}" />
</UserControl.Background>
How can I move this to code-behind, e.g.:
PSEUDO-CODE:
StackPanel sp = new StackPanel();
sp.Background = new ImageBrush(DynamicResource.GetResou...
I've been trying to get my head around XAML and it's namespaces and I just cannot seem to get the logics of things. For example, I'm trying to animate a gridrow's GridLength property following a tutorial. I can get the sample code to run just fine. But trying to actually port the features into my own code seems to be impossible. I always...
I know you can do it in CodeBehind with something like this...
#pragma warning disable 67
...
#pragma warning restore 67
But is there a way to do this type of thing in XAML?
For example, I have the following in my App.xaml...
<FontFamily x:Key="ExtendedFontFamily">Verdana</FontFamily>
And it keeps throwing me these VS errors (even...
Hey atAll!
Often found answers here, but now it`s my first time ;)
We use the MVVM pattern in conjunction with DelegateCommands. So normally I bind a command to the button like this:
<Button Command="{Binding SetXYZActivatedCommand}" />
I need to execute different commands when the button is pressed and when the button is released a...
How can I display an animated progress bar within the contents of a cell of a datagrid, with text in the foreground.
For instance, I want to display "Uploading..." and have the progress animated behind it.
...
I am currently working on a Silverlight2-based attendance register. I want to create a visualisation of attendance over time for students and classes, but am struggling to come up with a good way of doing it. The sort of thing I'm imagining is a grid with students on the vertical axis and date along the horizontal, with a symbol at the i...
Behold the following XAML:
<Grid>
<HyperlinkButton x:Name="Link" Background="Green">
<Grid Background="Red">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="12" />
</Grid.RowDefiniti...
How can I set expander to show some content it encloses even in collapsed state ? I have the following code snippet, can anyone point changes to this code ?
<Window x:Class="UI2.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="358" W...
Hi!
I'm fairly new to WPF and I have some problems getting databinding to work as I want. I've written a user control which contains a TextBox whose Text-Property I want to bind to a property of my UserControl, which I want to bind again to something else.
What am I missing?
XAML
<!-- User Control -->
<TextBox Text="{Binding Path=The...
I'm using PRISM (and thus the MVVM pattern). I've got a complex DateTime picker view with radio buttons.
The user can pick today, yesterday, a date, a week of a year, etc. I use radio buttons for the different choices.
What's the best way to do that in MVVM?
I really can't think of a clean way. I could create lots of custom behaviors ...