xaml

How to add SEARCH BOX using XAML

Hi, I have to add a search box, which has dropdown button kind (say it wil have TeamBook and PersonalBook) then when i select TeamBook, the searchbox should get the default data as "SearchTeambook" if not,"SearchpersonalBook". I have to do this using XAML. Please help me in doing this. Thanks Ramm ...

How to use an embedded image of a separate assembly?

Hi, there are many related questions/answers about that in SO. I took a look to some of them but none really match. An assembly (called ResourcesLoader) holds images as embedded ressources. I would like to use these pictures in another assembly. After looking at msdn pack uri, and seeing a lots of samples, I thought that the followin...

How to define XAML shapes in a ResourceDictionary and use them

What is the general approach for creating reusable XAML shapes in a ResourceDictionary? If I define a Path or other shape in the ResourceDictionary, how do I go about using it? I would like to have a clickable diagram in my application, made up of several shapes. I imagine that I would use Buttons in the diagram, but I would like them t...

WPF/XAML - Scaling text size to window size

I'm new to WPF. I have a WPF Window with a bunch of Labels on it as well as a ListBox. When resizing the window, I want to scale the size of SOME of the Labels, but not all of them. I don't want the ListBox to scale either--just some Labels. I understand I can use a Viewbox to resize as the Window resizes, but as much as I mess with ...

Stretching a XAML Path to fill its containing element

I have a ControlTemplate with some Paths in it. I would like the Paths to stretch and fill the control they are in, such as a Button. How can I do this? What I have currently looks like this: <ControlTemplate x:Key="SomeTemplate" TargetType="Button"> <Canvas Background="AliceBlue"> <Path Data="M 99.5,50 A 49.5,49.5 0 1 1 0....

Dynamically xaml file's code-behind externally?

I've been writing applications that load xaml files dynamically using XamlReader. That way I can skin my applications in different ways, or distribute just simple xaml files to users for different amounts of functionality. Now I'm wondering if there's a way to do something similar for code-behind files. Is there a way to distribute a loo...

Dynamically added DataTemplate - StaticResource for Converter can't be found

Hi, I'm using the following code to dynamically add columns to my GridView: public void AddGridViewColumns() { GridView view = (GridView)_myListView.View; GridViewColumn column = BuildGridViewColumn(1); view.Columns.Add(column); } public virtual GridViewColumn BuildGridViewColumn(int blockIndex) { string templateXaml = ...

Aliasing Resources (WPF)

I am trying to alias a resource in XAML, as follows: <UserControl.Resources> <StaticResourceExtension x:Key="newName" ResourceKey="oldName"/> </UserControl.Resources> oldName simply refers to a resource of type Image, defined in App.xaml. As far as I understand, this is the correct way to do this, and should work fine. However,...

WPF : Binding Order

I have a usercontrol (ItemsView) that I use in one of my other view. Since I need to access its ViewModel, the ItemsViewViewModel is contained by the ViewModel of the view that contained the control. I use this control at many times and I find it useful to bind a collection on the ItemsSource of my ItemsView control (differently, dependi...

WPF - Truly modal window possible?

Or would I have to do something like create a windows form and host the xaml inside it? Trying to get as consistent a look and feel as I can. If I can only do the latter, how do I achieve that? ...

MVVM - Where should I put code that dynamically generates and loads XAML?

Hi, I guess this is sort of a philosophical question, but I have some code that dynamically adds templated columns to a GridView by generating the XAML at runtime from Model data and loading it using XamlReader. My question is, In an MVVM world, where should I put the code that accomplishes this? At the moment, I have it in the codebehin...

Xaml do not load UserControl from ViewModel object?

I have a Xaml code that should load my UserControl inside the TabControl. If I put this Xaml code: <DataTemplate x:Key="WorkspacesTemplate"> <TabControl IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=Gui}" ItemTemplate="{StaticResource ClosableTabItemTemplate}" Margin="4" /> </DataTemplate> I have absol...

Best charting tool for silverlight and wpf

I came across the following till now visifire Teechart Silverlight toolkit chart Dundas has anyone worked on a charting project in silverlight/wpf !! which charting tool would you recommend ? I want to make a wrapper around charts for historical/real time data . Want the chart to have a datamodel which can be extended easily . ...

Streaming Audio/Video in WPF with early versions of WMP?

Hey guys I am developing a Wpf App for a large client base, and have just found out that Windows Media Player 10+ is required in order to properly use the MediaElement XAML class in my Form. I personally don't use WMP, so I did not have it updated in my system (it was version 9, so no video played). I know for a fact many of the clien...

Wpf Combobox Rounded Corners

hi, How can i make a combobox edges rounded..?.I have tried in blend,but no success till now..Any input will be highly helpfull ...

ListBox working on WPF but not on Silverlight

I've got a style: <Style x:Key="StarPathStyle" TargetType="Path"> <Setter Property="StrokeThickness" Value="1"/> <Setter Property="Stroke" Value="#FF000080"/> <Setter Property="StrokeStartLineCap" Value="Round"/> <Setter Property="StrokeEndLineCap" Value="Round"/> <Setter Property="StrokeLineJoin" Value=...

XAML tooltips are being clipped

I am trying to make a WPF app (regular Windows app, not XBAP or Silverlight). I want the main app window to support transparency, and show through the desktop below. But when I specify ToolTip text on a Button, the ToolTip appears beneath (z-order) the main window! I have a screenshot where: * Another app overlapps and blocks view of t...

Is it possible to configure a GridView to show pivoted data using static XAML if column info is unknown at design time?

Hi, I was recently, um, chastised for generating and loading XAML markup at runtime using XamlReader.Parse(). I was told that there's no reason to use XamlReader--it can always be done with static XAML, predetermined at design time. I attempted to ask this person how I could construct a GridView to show pivoted data, where the number of...

XAML Alternatives

I love WPF, but I hate XAML. XAML is too verbose, has syntax issues when Microsoft tried to extend it (see StringFormat on Bindings), and is difficult to navigate. Are there any alternatives to XAML? (These are just my opinions. Feel free to disagree.) ...

Placing arbitrary controls in InputGestureText area (WPF Menus)

I'd like to put an image on the InputGestureArea of a WPF menu. Normally only string values can go there. I'm guessing the solution involves style tags, but I'm a complete noob to XAML/WPF, so any help is appreciated. ...