I'm wondering how I can use an XmlDataProvider to provide arbitrary XML data for design time use in Blend 4. I've tried a few ways of specifying it but Blend doesn't pick it up. My UI elements end up blank.
I realize Blend has functionality to generate and manage sample data but that's a lot of overhead for some of the simple user contr...
So I'm binding to a generic datasource that's comprised of different types of classes.
I'd like to filter the tree based on the class types. I.e., I don't want the tree to show a node at all for certain types of classes.
Has anyone run into this?
...
I have an application with many images that all look the same and perform similar tasks:
<Image Grid.Column="1" Grid.Row="0" Name="image_prog1_slot0" Stretch="Uniform" Source="bullet-icon.png" StretchDirection="Both" MouseDown="image_prog1_slot0_MouseDown"/>
<Image Grid.Column="1" Grid.Row="1" Name="image_prog1_slot1" Stretc...
Back in January 2009, Dino Esposito published an article on MSDN titled "Managing Dynamic Content Delivery In Silverlight". We are considering using an approach like this for an upcoming project and were wondering if anyone had any advice on whether this is a good approach. Are there any traps or pitfalls we should look out for? We curre...
I want to display Japanese chars in my WPF application:
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="300" Width="300">
<Grid>
<TextBlock Text="はい" FontSize="30" />
</Grid>
</Window>
...
Hello, I would like to make a small silverlight app which displays one fairly large image which can be zoomed in by scrolling the mouse and then panned with the mouse.
it's similar to the function in google maps and i do not want to use deepzoom.
here is what i have at the moment. please keep in mind that this is my first silverlight ap...
My brain is all over the map trying to fully understand Unity right now. So I decided to just dive in and start adding it in a branch to see where it takes me. Surprisingly enough (or maybe not), I am stuck just getting my darn Application to load properly.
It seems like the right way to do this is to override OnStartup in App.cs. I'...
Silverlight Chart Legend Style
With Silver Light 4 Tool Kit April 2010
Going off various examples I have found on the web, I am trying to set the legend style so the items are side by side. Error returned “cannot find Style Property ‘ItemsPanel’ on the type ‘System.Windows.Controls.DataVisulization.Legend’
<chartingToolkit:Chart.Legen...
I am trying to bind a 2D array of buttons arranged in stackpanels to a 2D ObservableCollection...
Yet, I'm afraid I don't understand something very elementary about binding.
My XAML:
<Window.Resources>
<DataTemplate x:Key="ItemsAsButtons">
<Button Content="{Binding}" Height="100" Width="100"/>
</DataTemplate>
<...
I am having some issues trying to learn WPF. What I am trying to do is to bind a class that has a string and an array of strings. I would like to bind the string as the title and array as the contents of an expander, but I am having difficulties. What am I missing to make this work? Any help would be appreciated, TIA.
This is the co...
I'm trying to use a 3rd party component in my Silverlight application and when I try to create an instance of the control, I get a XamlParseException:
{System.Windows.Markup.XamlParseException: Set property 'System.Windows.FrameworkElement.Style' threw an exception. [Line: 0 Position: 0] ---> System.Windows.Markup.XamlParseException: El...
The wired problem is, in VS 2008, everything works fine. In VS2010 while serializing, it is missing the "ReportDimensionElements" so I'm unable to get the values back from the serialized value back from the XAML. It says, "'ReportDimensionElements' is null" am I missing anything silly.
Note: I have marked the ReportDimensionElements cla...
Hi ladies(?) and gents,
I am currently evaluating my options for a rewrite of the projects I'm working on and I am a bit miffed by the stringly-typed nature of our app.config files.
I'd like to move to a more structured approach, so I have two options:
Use custom SectionHandlers in the app.config
Scrap app.config and use XAML instead...
Hi,
I've recently been working on a project using WPF to produce a diagram. In this I must show text alongside symbols that illustrate information associated with the text.
To draw the symbols I initially used some png images I had produced. Within my diagram these images appeared blurry and only looked worse when zoomed in on. To impr...
I have seen this this post that shows how to do it from XAML, but how can I get a ResourceDictionary object from a Resource dictionary located in a different assembly? The XamlReader.Load has an option to take a filename parameter, but I dont think it works with the pack uri syntax. Any ideas?
...
How do you color a rectangle in C# that has been declared in XAML in WPF?
There is a rectangle control in XAML. In my C# code there are times in which it would be nice to fill the background color. How does one do this?
...
VerticalScrollBarVisibility works when I define it inline like this:
<UserControl x:Class="TestScrollBar.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas....
I actually don't like #region in my code. BUT for some reason call me crazy, I would like to have them in my XAML. I would like whole sections to have a #region-like thing and collapse them (e.g. my <Window.CommandBindings>, <Grid.*Definitions>, <Menu>, <Toolbar>, etc..
Does this exist? If not, how about <RegionCollapse>
...
Simple Silverlight question: I have an ObservableCollection<MyObject> in my viewmodel. Every MyObject has a Label property. If I bind a ListBox to the collection and set DisplayMemberPath to Label, or set the ItemTemplate to a TextBlock that binds the Text property to Label, all works as expected.
If I change MyObject so it derives from...
I am using the expander control and have styled the header as shown in the picture below.
The problem I have is that I want the expander button to be contained within the header so that the line for the end of the header template aligns with the Expander content i.e. I ultimatly want to end up with something similar to the image below...