I have created a usercontrol which accept type of enum and assign the values of that enum to a ComboBox control in that usercontrol. Very Simple.
I am using this user control in DataTemplates. Problem comes when there comes nested type.
I assign that using this notation
EnumType="{x:Type myNamespace:ParentType + NestedType}"
It wor...
Is there any more elegant way to do the following?
Basically I need an easy way to programatically build a WrapPanel (or other FrameworkElement) that:
wraps correctly
allows some words to have bold text
allows some words to have italic text
allows other formatting, e.g. color, background
ideal would be some method that converts e.g. "...
Hi,
Has anyone worked on the xaml browser(xbap) application? how is it different from a typical asp .net web application and in what scenarios we can it can be used?
...
I'm trying to visualize a XAML resource file at design time. When I merge the dictionary for the following XAML resource file into a XAML Window I get the error: Could not create an instance of type 'GlyphTypeface'.
The problem line is:
<GlyphTypeface FontUri="C:\WINDOWS\Fonts\TAHOMA.TTF" />
I have verified that the font exist in the...
I have a WPF UserControl containing a custom DependencyProperty named MyDP. I want to bind this to a property on my ViewModel (which is injected as the UserControl's DataContext). I know one way to do it by setting the binding in the UserControl's declaration in the parent window's XAML as such:
<Window x:Class="MyNamespace.Views.Main...
I created the following class in order to have an easy way to display formatted text in a WPF document.
However this solution returns a FlowDocument, and I am having trouble integrating this FlowDocument in my current application in which I was simply adding TextBlocks to StackPanels and WrapPanels and Borders, etc.
How can I add the ...
Thanks to Leom's answer I was able to add a FlowDocument to a StackPanel by wrapping it in a FlowDocumentReader.
But now I have two problems:
it seems only the first FlowDocumentReader is added and the rest ignored
there is an unwanted margin that I can't get rid of
How can I add multiple FlowDocumentReaders to a StackPanel without ...
Well i have a custom control and when Visibility is changed to Visible i have a trigger with a enter/exit action but the problem is that when the exit action fires the Visibility is no longer Visible so the animation can't be seen how would i fix this?
here is my trigger:
<ControlTemplate.Triggers>
<Trigger ...
How do I bind the height of TextBlock to the height of the parent control?
I have a TextBlock inside a grid and I want the TextBlock height & width to be the height & width of the grid cell without hard coding the values.
Cheers
AWC
...
Hi!
I am currently trying to resize a Telerik graph by placing it within a DockPanel because the Y axis label text keeps getting clipped when the graph is resized using "this.RadChart1.DefaultView.ChartArea.Height" in hope that this formatting error will be corrected.
The problem I am currently experiencing with the "DockPanel" is that...
I have a WPF UserControl with binding converters referenced like this:
<UserControl x:Class="MyControl" x:Name="MyControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TheMainNamespaceOfThisAssembly">
<UserControl.Resourc...
I've got a subclassed UserControl that is the content for my main window. I added a DepedencyProperty to my usercontrol, of type ResizeMode, and the PropertyChanged callback sets the ResizeMode of the main window to the value correctly. It runs fine. I can set it from the code behind, or from the XAML, and it works correctly.
However, w...
I want to set up data binding using a custom component.
Basically, I'd like to do something like this in my XAML file:
<ControllerDataBindingBridge>
<Bind TargetControl="eFirstName" Property="FirstName"/>
</ControllerDataBiondingBridge>
How do I create ControllerDataBindingBridge, there doesn't appear to be a simple Component whi...
When I add a dropshadow bitmap effect to a rectangle, the dropshadow takes into account the transparency of the rectangle (makes sense). Is there a way to render a dropshadow on a transparent rectangle 'as if' the rectangle were opaque? ie what would appear is a rectangle-shaped 'hole', with a dropshadow.
Here is the XAML for a transpar...
Hi!
When I add a resource on my main application (Application.xaml) then my pages doesn't load its design viewer because it tells me there is an error in one resource (DesignerItem.xaml). Otherwise in run time it works perfectly.
Application.xaml:
<Application xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ...
I would like my elements generated from datatemplate to look differently depending on some properties in the model. For example I want to display the text in various colors or present different images or path drawing for each generatred element. I know how to do it in general, but I'm looking for a solution that would allow editing the v...
I'm currently trying to build my personal website with Silverlight 3 and I've got this idea that you should be able to flip through the content in a certain way. I haven't seen exactly what I wanted before, so I uploaded a screenshot of the design for you guys to get a better idea of what I'm talking about:
As you can see it's more or...
Say that I have the following piece of XAML:
<Window>
<StackPanel Orientation="Horizontal">
<Label>Phone:</Label>
<TextBlock Text={Binding PhoneNumber}"/>
</StackPanel>
</Window>
I would like to reuse this as the content of a ContextMenu. What is the best way to do that?
...
Notice in the image below the 1px highlight below the text in the grey panel. How could this be achieved with WPF/Silverlight?
.
...
What would the best practice be for laying out the following item?
.
I am particularly interested in what controls I should use and how I position the delete icon to appear on the right-hand side and the tools icon to appear in the middle always?
Thanks in advance.
...