I can imagine WPF has a very easy way to grab XML from RESTful services and bind it into elements, e.g. GridView, perhaps even with 100% XAML.
Does anyone have any example code showing this?
...
In the example below I have a ListBox with dozens of font names in it.
I would have thought it would automatically have a vertical scrollbar on it so that you can select ANY font, not just the first ones in teh list, but it doesn't.
So I added a "ScrollViewer" and that puts a "scrollbar area" on the right but there is no scrollbar in t...
I have this ListBox:
<ListBox Name="lbColor">
<ListBoxItem Content="Blue"/>
<ListBoxItem Content="Red"/>
<ListBoxItem Content="Orange"/>
</ListBox>
This code pre-selects the choice alright, but doesn't set the focus, how can I do that?
public Window1()
{
InitializeComponent();
lbColor.SelectedIndex = 1;
lbCol...
What is the function of the namespace here?
I would think in this simple example I would be able to put "Key" and "XData" instead of "x:Key" and "x:XData" but when I do it says "Key" was not found in XmlDataProvider.
<Window x:Class="DataBindingWPF.XmlBinding"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
x...
In the below code, the ListBox gets filled with the names of the colors from the XML file, but those names strangely do not appear in the TextBox.
However, if you bind the textbox to the static "lbColor2", those names do appear.
So what could be different about the names when they come from the XML source which makes them not get passe...
So I have a little WPF XAML that gets the titles of my RSS feed and puts them in a ListBox.
However, it takes about 2 seconds to load.
How can I have put some kind of AJAXy spinning graphic in the ListBox until the data is there?
Here is the code:
<Window x:Class="WpfApplication5.Window1"
xmlns="http://schemas.microsoft.com/winfx...
I have a WPF window that uses validation. I created an error template that puts a red border around an element that fails validation and displays the error message below. This works fine, but the error message is rendered on top of any controls beneath the control with the error. The best I can tell, this happens because the error tem...
I'm making my first foray into WPF - I have a simple form with a popup defined for inline help. I'm using rounded corners, and for some reason a black background is bleeding through around the corners. I don't understand which element is causing the problem.
I assume it's something blindingly obvious which I'm just not seeing. Here...
I am trying to achieve the same behavior as indicated in the following post. The trouble is this post solves the problem for WPF.
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/4fd42590-8375-46d0-b7bc-6c217df0f0ba/
Any ideas on how to do this in Silverlight 2.0?
Thanks
Chris
...
In Silverlight/XAML you have namespaces such as:
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
and so elements have namespaced attributes like this:
<TextBlock x:Name="theMessage" Margin="10">Testing...</TextBlock>
When would this be a benefit for me? Would I at some point create another namespace, e.g.:
xmlns:edward="ht...
Hello,
I'm currently charged of developing a way to use WF in our application and I have a set requirements that I need to follow.
I need to be able to define the workflow purely on text so I can store it and retrieve it for execution.
During the workflow execution a DataObject needs to be passed between the activities so they can per...
I'm trying to find out exactly what I can do and what I can't via no-code workflows. I'm trying to develop a solution where clients can author workflows without compilation, but need to check we can do all we need.
I know I can't:
use CodeActivities
pass parameters in and out
handle events
CallExternalMethod, call web service etc (now...
I'm aware that in WPF you want to keep the sizes of controls as flexible as possible so that they can flow and expand depending on their context (like in CSS).
But most of the code examples I come across are hard-coding sizes like the heights in this example:
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefi...
I have a problem with figuring out how to refer to a Canvas in another XAML file in my project, for example there is a Canvas object containing some labels, images called MyLayout and is stored in MyLayout.xaml
I want to use this Canvas in the main Window of the application in Window.xaml - how can this be done, as there will be multiple...
How would I take a Paragraph object and databind them to the TextBlock for use in a DataTemplate?
A plain bind does nothing, just a ToString() of the Paragraph object.
The InLines property would let me add a list of TextRun's that make up the Paragraph manually, but that can't be bound to and I could really do with a binding based solut...
Hi all,
I have a xaml form for use in my application, and i have subclassed the Frame class to create my own, and edited the interface to specify my own class for the content (as i need to access properties on the content for data binding).
The problem comes then in the designer that the compiler says it cannot create an instance of m...
I have a large silverlight application, and we have decided to redesign the whole interface. Since it is a good time to polish some issues, I would like to read some xaml good practices to take into account when designing.
Does anyone know of a good silverlight (or even WPF) book or guide to read about xaml? I'm not looking for a tutori...
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...
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:
...
In a VS Package (Visual Studio Extensibility), I have a custom extension registered (for ex ".custx") with XamlLanguageService, so that in Visual Studio when the user opens .custx, it opens up in Xaml Designer/editor just like a .xaml file.
However when I compile it as "Page" (BuildAction), the WINFX targets / Compiler errors out with ...