wpf

How to use left over space in wpf tab items row

Upper part of TabControl consists of TabItem controls. Is there a way to reuse remaining space there to put some WPF content? I think I could use a "fake" TabItem with different styling and put my stuff in TabItem.Header but I was hoping there's a better way. Solution Based on the answer below, I got the desired behavior by wrapping T...

WPF Image Source binding with StringFormat

Hello, I'm new to WPF and MVVM (started this week experimenting with it) and trying to bind image resources at runtime. The items I'm trying to display contain an enumerate property that indicates the type or state of the item: public class TraceEvent { /// <summary> /// Gets or sets the type of the event. /// </summary> ...

Render PDF using DocumentViewer control ?

Is it possible to render PDF using DocumentViewer (it's WPF control) ? If it is possible then how ? Code example or link to some code example would be appreciated. Thanks for answers. ...

WPF and WCF Data Services Authenticate at Query level?

So, I swear i'm utterly confused by how to secure WCF Data Services. In that, is there a simplified way of checking to make sure that the client that is sending the data to the WCF Service is authenticated more so, that the client itself is the client I wrote and not some mock client? Any URL"s that can help me decode this problem? ...

Using D3DImage in C++ .net

Hi, I think this is an easy question, sorry I am not really familiar with C++. I am using D3DImage in C++.Net project which is using it's SetBackBuffer method, and I am also using DX Surface. I don't know how to convert IDirect3DSurface9 to IntPtr as parameter in SetBackBuffer method. Anyone knows? please help. ...

Is it possible to "zoom" the text in a WPF RichTextBox?

I noticed the WinForms RichTextBox has a ZoomFactor property that I assume is exactly what I want--unfortunately this seems to be entirely missing on the WPF variant. Is there any way I can achieve the same functionality (increasing/decreasing the visible text size of the whole document without actually changing the underlying RTF)? Up...

Is there a WPF Typewriter effect?

Is there any equivalent to Flash's Typewriter effects in WPF? Thanks in advance! MemphiZ ...

Windows - forcing the display of one process/form within the confines of another

I am looking for suggestions on how to, on Windows, execute a windows form and/or WPF application, and force it's display to always be shown within the grahpic context of another completely separate process (basically as if the "child" process were simply another form control). As a little bit of background, we have a legacy 32 bit ap...

Label does not change value inside a while loop

private void button1_Click(object sender, RoutedEventArgs e) { int i = 0; while (i < 500) { label1.Content = i.ToString(); // System.Threading.Thread.Sleep(2000); ++i; } } I am trying to update the content of a Label each time a variable is incremented, but what happens...

WPF: Proper configuration for Window with a child UserControl (MVVM)

I am trying to properly accomplish the following. I have a UserControl (ProgramView). It has a viewmodel (ProgramViewViewModel). ProgramView is consumed as a child control within a Window (ProgramWindow). ProgramWindow has a public property ProgramId, so the consumer of the window can specify the desired Program (data entity) to show. Pr...

SkipToFill for non-running storyboards

Hello, I have a storyboard with e.g. 2 animations. Now I want the user give the possibility to skip a complete storyboard, yet the animated properties shall be set to the final value of the animations. When the storyboard is already running, SkipToFill does a perfect job for this. But I also need something like SkipToFill for a storyboa...

How to Manipulate photos with C#/.NET4

I'm looking for the best advice about how to manipulate/morph photographic images. I've been looking around but what I keep coming across is more 3D graphics or game development. What I want to do is manipulate 2D still images. Ideally I'd like to do this in SL4 but WPF would be fine. I am using .NET4/VS2010. Many thanks for the wis...

Format WPF progress bar decimals

I have a progressbar in WPF C# and I bind the text of a textblock to the value of WPF. All in one click, it's great. However, when sliding the slider, the value changes to many many decimals. How can I format this value to have for example 2 numbers behind comma? UPDATE: The request <Slider x:Name="eqbandwidth" Margin="164.122,111.813,...

Closing console closes GUI app too

I'm using C#/WPF, and generated a console programmatically using the WinAPI's Alloc/FreeConsole. When this is done, the standard System.Console class interacts wih it fine. Except, when you close the console by clicking the X rather than using FreeConsole(), it closes the rest of the app too. I'm using .NET 4- how can I override this beh...

WPF WrapPanel with tab stop?

Hi, I'm interested into make a wrap panel (plenty of other user control) to be a tab stop. The panel is within a scroll viewer, the scroll viewer do have the IsTabStop property, but the scroll viewer doesn't. I want the user to be able to use tab key to navigate each by one of the user controls located within the wrap papel. ...

WPF assembly reference missing - project still building

I am trying to use the Dynamic Data Display library for WPF in my solution. I added a reference to DynamicDataDisplay.dll in my project. I also added a namespace in the .xaml like this: xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0" Intellisense is not helping me when I try to add a element from the Dynamic Data Display...

Changing textblock origin in WPF

I have a textblock placed at the point 250, 250 (X: 250, Y: 250). Using a dot as reference, I can see that the textblock is placed at the origin 0,0 (of the textblock). Is there anyway to change the origin to, say, the center of the textbox, or the lower right hand corner? ...

app drag into a wpf window

I want to write an wpf application which can do the followwing things:I can drag a running application into the wpf application's window and it still works good; The apps which has been dragged into can hide when the wpf application hideThe apps which have been dragged into can be drag back to the Windows desktop and still works I am...

Window Interaction/Messaging in WPF

I have two windows, a main window an a window to update the database, the main window displays some data from the database. I have a private variable in main window that is connecting to DataGrid to pass the data, I need to update this private variable with information i entered in the update window. Should I try to access this data in t...

How to set DataTrigger value to const field?

I have class with const fields like this Areas { public const int Area1Id = 1; public const int Area2Id = 2; public const int Area3Id = 3; } And a template which is binded to Area class. Area class has int TypeId property, and I want to show different things depending TypeId property Code like this works perfectly <DataTrigge...