wpf

A terminal-like WPF textbox ?

Hello, I am looking for an embeddable interactive console. I want the user to be able to type in some custom commands, and the application to write command responses in it. Would be awesome if it would understand powershell or python, ans supports command completion. I already built my own bash-like terminal, but I do not want to tot...

Powershell pack uri object

I'm trying to create a pack ui referencing a xaml resource inside of an assembly file in powershell. After reading this post I tried to do this: $resource = new-object system.uri("pack://application:,,,/WPFResource;component/test.xaml") The I get an error noting that it is expecting a port since there are two colons. Can anyone pleas...

Wpf - can't make text wrap

Hi, I'm a newbee to WPF and I need your help - please. :) I need an ItemsControl with only vertical scroll and if items don't fit they must wrap. I've made a tiny sample of my code: <Grid> <ItemsControl Margin="64,73,65,76" BorderThickness="1" Name="lst" HorizontalContentAlignment="Stretch" Background="White" BorderBrush...

Is there a standalone visual editor for WPF xaml files?

Is there a stand-alone visual (WYSIWYG) editor for WPF xaml files like the Visual Studio 2010 designer? The VS2010 one crashes all the time and is very slow (there are lots of threads on XAML slowness in VS, but all the recommendations seem to point to editing the XML files with a text-based editor). I want a visual one as I'm very new ...

How to localize WPF without recompilation? (dynamically loaded XAML)

We have a WPF application that is loading a usercontrol at runtime from the deployed .XAML file (customer requirement - they want to be able to replace the views entirely). We would like to localize strings in this XAML file. All .resx file based WPF localization approaches I have found on the web seem to require recompilation when the...

How to use a List(Of T) as Itemssource for a WPF DataGrid?

I wanted to quickly display a List(OF String) in a DataGrid (dynamically), so I thought myDataGrid.ItemsSource = myList would be the quick and easy way to do it, since this works great for a DataTable: myDataGrid.ItemsSource = myDataTable.DefaultView My DataGrid has the AutoGenerateColumns property set to 'True'. And for the datat...

Stopping a StoryBoard

I am trying to mimic a game of bingo (lotto) and i am having problems with my display grid. The way i have done it is by showing a design for 1 - a number not called (notCalled) 2 - the number which is being called (myLabelJustCalled) 3 - numbers that have been called in the past. (myLabelCalled) The issue of have is when the number i...

WPF: Non blocking UI

Hi I have two checkboxes and a button. Under the button click handler, private void button1_Click(..) { if(checkbox1.true) { //start a process } if(checkbox2.true) { //start process 2 once process 1 is done} } Both process 1 and 2 are started asynchronously. How do i set the dependency between process 2 and process 1? I do not wan...

How to Genrate Property for Wpf Application for dynamically

Hi everyone i need to generate property dynamically at run time can any body tell me how to generate property in wpf at run time. in my window.resource block <Style x:Key="EditableTextBox" TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}"> <Setter Property="Background" Value="#FFF8E48F" /> <Sette...

Lambda expression create unrelated compile error

Hi, Whenever I add a lambda expression (in the following form) to my wpf project, I get an error. The errors are nothing to do with the expression, but they arrive every time I add one. here is my latest: using ( LeisureServiceClient client = ServiceFactory.Instance.GetLeisureService() ) { client.Execute( ServiceFactory.Instance.C...

Unable to find WPF User Controls in Visual Studio C# 2008; stuck with nonexistant Control instead.

Hi guys, This is a rather unusual question but here's the issue: I have a WPF control created in Visual Studio C# 2008, map.xaml, created in the project Remote. I want to add this to a Windows Form, also in Remote, using the ElementHost tool. Simple, right? I created the ElementHost, went to select the HostedContent, but the only cho...

MEF - Showing View from other View

I'm learning MEF and have some problems with understanding it. I have small project with MainWindow and some assemblies which are loaded into catalog. One of the assemblies need to show a view from other assembly, once at a start and later, if I click the button. Here is the head part of this view: [Export("OperatingPlugin", typeof(Use...

Handle ApplicationCommands in CustomControl

How do I wire ApplicationCommand.Undo to handlers in a custom control? Some code snippets would be most welcome... ...

How to render DirectX mesh file *.x in WPF application?

Hi! I have mesh file in DirectX format. For example 'dog.x'. I want to render it in WPF application. Could You please help me to load it in the application. I must convert in in XML format or smth else? How to use this file with MeshGeometry3D class? -- Best regards, Ivan. ...

(WPF) UserControl or CustomControl?

I need to build a specific interactive drawing "canvas". In that canvas, user will be able to place graphic elements - points linked with lines. I have a ready WinForms UserControl - pointsList that represents the list of points presents in the canvas. PointsList is able to add and remove points, link them with a line. pointsList sh...

In in WPF controls, which ones are similar to `<div>` HTML tag?

I need to wrap a group of WPF controls to that I can toggle their visibility at the same time. How can I do that? ...

Wpf Grid rows height is not calculated correctly with SizeToContent

In the following example, there are two Grid rows with height of 6* and 4*. The problem is that only after the user changes the the size of the window, the correct height of the rows is calculated. This only happens when the SizeToContent flag is set. Any ideas why? How can I force the window to calculate the height automatically when i...

A blinking button on wpf application

i have application that writing on wpf (c#) the application have style manger that i have build on blend. my problem is this i got a login button that blink and i dont find where is at and how to remove at. the style code of the login box here: <Style x:Key="LoginBoxGrid" TargetType="{x:Type Grid}"> <Setter Property="Background...

How to check if i'm in run-time or design time ?

I developed some userControl that contain some information check on the 'IsVisible' method ( override method ). When i using this usercontrol on some window - i see some error because the 'IsVisible' method look for some variable that is set on run-time. How can i check if I'm in design time and the system is not running ? Thanks fo...

Trigger before ListView change

Hi, I want to have a trigger when the select item in a WPF ListView is about the change. So a "Changing" trigger. This is not available by default. Is there a way to do this? I need this because my ListView is bound to a list of Client. When the client selection changes, I want to ask the user if he wants to store his changes, but when ...