wpf

Prevent a process from displaying a window during startup

I'm launching an application from a WPF app using the Process class that displays a splash screen at startup. Rather than show the user the splash screen, I'd like to hide the application for the first couple of seconds after starting it by keeping my window topmost and maximized. The problem is that starting this application automatic...

Visual Studio C# WPF run without debugging - nothing happens

I am new to Visual Studio 2008, and I am learning the old "Hello World" application using a WPF application. When I click 'Start without Debugging' I see a window open for a half-second on my taskbar, and then close. I dont get any window that stays open with my application in it. I cannot figure out why this is happening. If I trying op...

Capture coloured console output into WPF application

Similar to this question, except the console program being wrapped up in the WPF application produces coloured output, so it would be nice if I could capture the colour as well as the text. This is my first WPF program and I'm not sure how to go about finding/modifying the right control, currently I'm just using a TextBox which works bu...

Displaying live video from a raw uncompressed byte source in C#: WPF vs. Win forms

I have a live 16-bit gray-scale video stream that is pushed through a ring-buffer in memory as a raw, uncompressed byte stream (2 bytes per pixel, 2^18 pixels/frame, 32 frames/sec). (This is coming from a scientific grade camera, via a PCI frame-grabber). I would like to do some simple processing on the video (clip dynamic range, color...

How to change control template from Style.Triggers

I've done it this way: <Style x:Key="Button" BasedOn="{StaticResource LoginButton}" TargetType="Button"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Grid> <Border CornerRadius="4"> <Border.Background> ...

Cryptographic failure in WPF Reports v0.4 alpha

I just downloaded the WPF Reports v0.4 alpha When I build the project in VS 2008 I got the following error. Cryptographic failure while signing assembly ' \CodeReason.Reports\obj\Debug \CodeReason.Reports.dll' -- 'Access is denied. ' CodeReason.Reports.VS2008 What is this error mean and how can I resolve this? ...

how can i change controls when a button is pressed in xaml

i am trying to create a wpf app and have different parts in user controls. in the navigation i have some buttons (now using the ribbon ctp). is it possible to change the main user control when different buttons are pressed in xaml. or is this just a bad way to do things? sorry, really new to xaml and im trying to get my head arround it...

Making WPF ListBoxItems selectable

I have a ListBox with a rather simple ItemTemplate defined - containing a TextBlock and a Button. This displays like expected, but there is a problem though. When I click the content of the ListBoxItem, i.e. the text or the button, the line doesn't get selected in the ListBox. If I click the blank parts of the line it does. I'd like the ...

Insert OLE object into WPF canvas?

Hi Folks! I'm getting stuck to a problem now for quite a long time. I want to use MathType (www.dessci.com) for my own application. Thats why i have to insert an ole object into a System.Windows.Controls.Canvas derived control. I searched the internet for quite a long time, not with real success. I found out that I probably have to use o...

Why isnt WPF displaying an accented character correctly?

I'm downloading a webpage, and then loading strings from the page into a WPF UI. One string has an accented character: "Áine". In the debugger, the string looks fine, but when added to a WPF ListBox, it appears like this: Á[]ine, where [] is a single rectangular symbol. When I copy the text from the debugger UI and paste it, a space ap...

How can I extend this dependency property example to recreate a DockPanel.Dock="Top"-like dependency property?

I'm trying to get a better understanding of what dependency properties and what they are not. I've built the example below which enables a combobox's choices to change based on how the user moves a slider. In creating this I learned that dependency properties actually have nothing to do with INotifyPropertyChanged as is used in ViewMode...

How to add Button to WPF Datagrid column dynamically ?

Hi .. Is there any way to dynamically add a button control(along with column name) to WPFDataGrid column,?? By clicking on header button,pop-up will open . this button generation is dynamic one ,which will be decided from code-behind, for some column headers need to add,for some not needed to add. ...

I've created an Attached Property, now how do I use it?

I'm trying to determine if Attached Behaviors are something we need in building controls for the forms in our application. Hence, I not only want to know how to create Attached Behaviors but want to see real instances in which they are used to solve problems. I used this MSDN article to create a UserControl with an attached property in ...

WPF - ImageBrush with PNG, not respecting alpha-channel

I want to use an imagebrush to use in the Rectangle.Fill. The file is a .PNG. It comes out looking like it is sitting on a little gray pad. The image brush is returned from a converter with something like this. BitmapImage image = new BitmapImage(new Uri(fileName)); ImageBrush imageBrush = new ImageBrush(); ...

WPF - Prism - Activate and Deactivate views in a ContentControl region

Hi, In my application I only need one view visible at a time which is why I am using a ContentControl in my shell. The issue is that if I have one view visible (lets say View1) and I activate View2, everything is fine up to this point. Now the user presses the Close button on View2 after which the users end up looking at a blank screen ...

WPF - MultiTrigger in ControlTemplate, strange behaviour.

Okay, I've not done much WPF lately and this is confusing me. I have a Style defined for RadioButton, which uses a ControlTemplate with a MultiTrigger. The gist is that I want a Border to become opaque when the mouse either hovers over it or when it's IsChecked is true. So I have the MultiTrigger, which animates the Opacity in and ou...

different images for enable and disable states of a button in WPF

I want to change the image of the button in the code below based on its state i.e. use different image for enable and disable state. <Button CommandParameter="Open" > <StackPanel Orientation="Horizontal" > <Image Source="../icons/big/open.png" Width="20" Height="20"></Image> </StackPanel> </Button> Thank you. ...

Need to control "Z Order" of windows within WPF Application.

I have an application that, due to OpenGL airspace issues, has to host several controls in separate, exclusive windows. This is working quite well, but I am setting all of the windows to TopMost=true, which means that they do stay showing even when they lose focus, but they also overlay other applications... Also, it kind of binds me t...

ItemsCollection and alternate row coloring

I've got an itemscollection and I want to have alternate row colouring, I've looked about how to do this but can't find anything, I seem to think this should be simple but maybe I'm missing something. It's WPF btw. <Grid> <ItemsControl Name="itemsControl"> <ItemsControl.ItemTemplate> <DataTemplate> ...

After minimizing app, on restore, windows pursues mouse pointer

Hi! I have an application in WPF C# where other than the purpose of what it's done, I customized the close and minimize buttons. The problem is that when I minimize, all is good, I cycle around all other apps, but, when I want to go back to the application, I click in the window in the taskbar, and the window pops up... But when it pops...