I am attempting to create a reusable navigation style Custom Control in WPF, like a navigation bar on a website. It will contain links to all the main Pages in my app. This control can go on top of all my Pages in my NavigationWindow. Giving a nice consistent look and feel across pages, like a website.
My issue is in styling the curr...
Specifically, I'm looking to use the 16*16 32-bit png images included with the VS2008ImageLibrary. I've tried manually setting the Height and Width attributes of the image, adjusting margins and padding, adjusting Stretch and RenderOptions. My attempts to create toolbar buttons have all led to either Improper Scaling (blurry icons), the ...
I have a Canvas in WPF and I want to prevent its children from being drawn outside the edges of the Canvas ara. In WPF this is simple as you just set the ClipToBounds property on the Canvas to True and it does as expected.
Porting the sample XAML to Silverlight there is an issue because ClipToBounds does not exist! Is there a way to si...
I am using a DoubleAnimation to anamiate the Angle property of a RotationTransform. Several times per second, I need to change the rate of the rotation in response to external data so that the rotation speeds up and/or slows down (smoothly) over time. I am currently doing this by using a DoubleAnimation that repeats forever from 0.0 to 3...
I've spent the better part of the day trying to figure this out. From what I understand I need to use an XmlDataProvider but while debugging I see that it doesn't contain any data.
Can someone demonstrate how to do that?
...
Is there a way to force showing the + sign in front of positive numbers when using StringFormat?
For example:
<TextBlock Text="{Binding Path=PercentAgainstBudget,
StringFormat={}{0:0.00}%}" />
If PercentAgainstBudget is negative I see the - sign. But if its positive, it does not. Since this number is an off...
Hi!
I'm developing a program in WPF (VB) that relies on keyboard navigation only.
In my program, I have a listbox that displays up to 20000 items.
What I want is that when the listbox has keyboard focus, and I move to the bottom item that is visible (using ArrowDown), I want the focus to move to the next item outside the listbox. I'm...
Hello, I am currently trying to figure out how to reuse a template in other controltemplates (as the title says). What I am trying to do is make a bunch of buttons that are all slightly different but have several similar features. They all share several of the same graphical elements and have the same triggers that deal with those graphi...
I have a list box that contains items that are represented by a single textbox.
When the user clicks a button, I want to iterate thru all these text boxes and check if their binding expressions are clean of errors;
Should be something like:
Dim errCount = 0
For Each item In MyListBox.ListBoxItems 'There is no such thing ListBox...
A part of the editor i'm writing uses a Wpf-TreeView. I'm using DataBinding and an ItemTemplate to populate the TreeView. So far i'm manipulating the ItemsSource(mostly ObeservableCollection's) dircetly(using for example Drag&Drop). But now i read this and i'm not sure if it would realy simplify thinks for me. And before i go on with the...
Hello, I am looking for a way to be able to have an event run after a command executes. I am working with EditingCommands (ToggleBold, ToggleItalic...ect.) and would like to be able to have a method called directly after the command finishes whatever it is doing.
An example would be that I have some text selected and press Ctrl+B and tha...
N.B THIS QUESTION HAS BEEN UPDATED, READ FURTHER DOWN
Hi,
I want to create a custom context menu that has 4 sub-menus, each in their own quadrant (top left, top right, bottom left, bottom right). Similar to 3ds Studio Max.
This is how I've approached the issue so far:
- create a custom WPF control, derive from ContextMenu[1]
- decla...
We are using Winforms using the Infragistic framework.
We are considering the move to WPF. The problem is that we have already several forms, dialogs etc in Winforms. We need common look and feel thus we need to migrate all to WPF.
Is there a migration tool to take Winforms and migrate to WPF? I know it is not possible to do it complet...
In <Window.Resources> I have defined following style:
<Style x:Key="textBlockStyle" TargetType="TextBlock">
<Setter Property="Margin" Value="5,0,5,0"/>
</Style>
I have defined some grid where I have four TextBlocks:
<WrapPanel>
<TextBlock Style="{StaticResource textBlockStyle}">Server</TextBlock>
<...
I have a window with a number of controls upon it, each control with a Tooltip associated. In an effort to jazz up the window a little, I have overlayed some semi-transparent ellipses which gives the whole window a glossy finish, however, in some cases the positioning of these ellipses are preventing the hit-test getting down to my cont...
Right now I have a Stackpanel, that contains a collapsed Expander, and a Listbox.
The Listbox beneath the collapsed Expander is being positioned as if the Expander was expanded. Is it possible for the StackPanel to dynamically do layout based on the collapsed size of the Expander, and then on the Expanded size of the Expander once it's ...
I have the following XAML:
<ListView x:Name="debitOrderItems" ItemsSource="{Binding DebitOrderItems}">
<ListView.ItemTemplate>
<DataTemplate>
<CheckBox x:Name="checkbox" Content="{Binding}" IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}, Path=IsSelected}" />
</DataTem...
Hi everyone, I'm an experienced C# developer but a WPF newbie. Basic question (I think) that I can't find an answer to by web searching. Here's the simplified use case...
I want to display a string in a WPF TextBlock. So I write some C# code in codebehind of my XAML control...
public class MyCoolControl : UserControl
{
public voi...
I want to display time in the Label. The label contents needs to be refreshed automatically as the window is loaded.
I have a simple WPF Window with a Label control in it. As illustrated here
<Window x:Class="shoes.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/w...
Hi!
I am looking for an easy way to convert some XAML animation to C# code. Is there any tool available to do that?
Thanks!
Wally
This is the code I am trying to convert:
<Storyboard x:Key="Storyboard1">
<Rotation3DAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="DefaultGroup"
Storyboard.TargetPrope...