wpf

How to host a terminal session (mstsc) in a WPF applicaiton?

There are some tools out there for managing multiple terminal (mstsc) sessions. How would I go about achieving something similar in WPF? ...

WPF: Data binding & Display member path

i have created a RibbonGallery/ComboBox to display a list of installed fonts. but sometimes after entering say "V" this is what i get look at the text in the menu. [Font Family: Name=... why is that happening. code // xaml <ribbon:RibbonComboBox Label="Gallery"> <ribbon:RibbonGallery SelectedValue="ABC" SelectedValuePat...

WPF/C# - Decode/View IIS Smooth Streaming Content

Hi, I'm trying to write an application that is able to download the "chunks" sent by a IIS Smooth Streaming server and capture thumbnails of the video. I'm able to create the proper GET requests to download the chunks, but I'm having trouble finding a way to play or view the chunks I download. Does anybody know of a way to combine and ...

How can I get Underline and bullet positions in WPF RichTextBox

For a WPF RichTextBox, is there a way to obtain the co-ordinates of the text decorations, such as the stroke applied for Underlining? the co-ordinates as well as the shape\character used for bullets in bulleted list? ...

Can I calculate\control the offset where underline is positioned in RichTextBox?

Is there some way to calculate the offset at which WPF renders Underline in text in a RichTextBox? Can I change this offset? ...

Why the need for Binding in this context

i am starting WPF, looking at How do o: Getting started with Entity Framework i am abit confused why the need for <ListBox Name="ListBox1" ItemsSource="{Binding Source={StaticResource CustomerSource}}" > why cant i do <ListBox Name="ListBox1" ItemsSource="{StaticResource CustomerSource}" > how do i know when i need Binding. beca...

WPF: Creating image of dynamically created usercontrol

I want to create the image of a dynamically created usercontrol and show it in a window. I am creating the usercontrol using the Below code . MyViews.MyViewsUserControl myViewsCanvas = new MyViews.MyViewsUserControl(AllFoundationMyViewsViewModel,item.Id); //myViewsCanvas.Height = 5; /...

Why setting x:Name on Window.Resources items does not work

i just curious why when i access most controls via x:Name, for resources i do so using x:Key + i cannot access it from code (could using this.Resources["keyName"]) ...

How can I restart WPF application??

How can I restart WPF application from code? in Windows Forms there is Application.Restart, where for whatever reason Microsoft decided not to add this method in WPF. I hate the discompatability between WPF and WindowsForms! like: window.Visibility = System.Windows.Visibility.Hidden; What's wrong with that? w...

Null items not shown in ComboBox with binding

Hello, I'm having some difficulties with null and a ComboBox in WPF/C#; If a add a null item it is not shown/listed in the ComboBox. Here is de XAML declaration of my ComboBox <ComboBox ItemsSource="{Binding Path=MyList}" SelectedItem="{Binding Path=Type}" /> MyList is declared as public ObservableCollection<Type> MyList...

WPF XamComboEditor/ComboEditorTool - Setting default text

Hi I'm trying to add some default text to combo boxes that will show when there is no item selected. I'm using a style to acheive this which works great when the combo is first loaded. <Style TargetType="{x:Type igRibbon:ComboEditorTool}" x:Key="PleaseSelect"> <Style.Triggers> <Trigger Property="SelectedIndex" Value="-1"> <Setter Prop...

C# WPF Switch Resource Programmatically

Hi, i`m trying to design a dialog window which will display different messages depending on what case will be true. so for example when i have a <CustomDialog Content="{Binding Path=Name}"/> is there a possibility to change the Binding Path=Name to Path=Whatever or how do you implement something like that ? When the Control should us...

[WPF] How to set DockPanel.Dock value in a Setter?

When creating a style or trigger e.g. for a TextBlock in XAML you can easily do: <Setter Property="Width" Value="64" /> How to do the same with 'DockPanel.Dock', which is an attached property? ...

WPF: Transforming a model's position(s) directly

Hi; I'm new to WPF, and I'm trying to understand the underlying architecture, so please correct me if I'm wrong: As far as I know, there are three possibilities to dynamically transform a GeometryModel3D during runtime: a) Set the model's Transform-property to a Transform3DGroup once, to which you add new / duplicate Transformations. ...

Change text in datagrid in databound, in wpf

Hi, i have a wpf datagrid, heres my datagrid <dg:DataGrid x:Name="dataGrid" AutoGenerateColumns="false" ColumnHeaderStyle="{StaticResource columnHeaderStyle}" AlternationCount="2" RowBackground="Beige" RowStyle="{StaticResource rowStyle}" AlternatingRowBackground="LightBlue" ...

Stopping a TranslateTransform when the checkbox is unchecked

Hi I have a translation transformation in C# WPF that starts when a checkbox is ticked, and I would like it to stop when you uncheck the checkbox, naturally. How do I do this? Thx ...

WPF Element Binding With Dynamically Generated UI Elements

I have a page in which I have a grid with 2 columns, one accommodating 80* width and the other accommodating 20*. Beneath the grid is a stack panel to which I load UI elements (child stack panels) at runtime. My objective is to bind the widths of the stackpanels to the columns of the grid. This works perfectly and the stackpenels resiz...

WPF Newbie Grid Binding Question

I'm new to WPF. I have been been playing around with binding data to a grid. However the example below never calls the method that will be used to populate the grid. What do I need to do to make this go? <Window x:Class="DataGridView.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:local="clr-nam...

Different font-sizes and orientations in a TextBox in WPF(C#)

I have a text box like this <TextBox x:Name="SA1" Grid.Row="1" Grid.Column="1" TextAlignment="Center"/> I need a single/two digit number to be placed in the Top-Left corner of this textbox in a lowered font-size. And rest of the text must be styled in a bigger font-size at the center of the Textbox(both vert and hor). How can I progr...

Custom WPF DatePickerTextBox Template Help

I am trying to use a custom textbox in the DatePicker control, but I can't get the date to bind from the popup calendar to the TextBox. I don't want to have to style the entire DatePicker unless I have to, and the DatePickerTextBox has its own control, so there must be a way to only alter it. The code below is what I have as a start: <S...