wpf

WPF KeyboardFocus Popup issue

Hi ! I've got problem with keyboard focus. This is how it works now (not correctly): TextBox MyControl if MyControl.PopupShowed then GOTO 1. else GOTO 4. ComboBox I want by Popup Close to continue with the last tab focus, that means jump from 3 to 4. How could I do that, please? <Window> ... <TextBox /> <MyControl> ... <Po...

how to call php functions from .NET WPF application?

So I'm going to bild a simple PHP CMS. I need to know how should I bild it to be able to call its functions from .NET WPF application. And how to call PHP functions and send forms from WPF .NET application... BTW: I'm going to have users with passwords that would need some form of autentication. after which they'll need to call that fu...

Any idea on how to sort a CompositeCollection?

I have a CompositeCollection that consists of ObservableCollections of two types: Companies and Contacts. Contact has a property FullName while Company has a property Name. I want to apply sorting so the collections are mixed by their types but sorted by their name, example: Itzhak Perlman John Doe Microsoft Sarah Moore StackOverflow W...

Can't seem to get Timepicker to work (C# / WPF)

I'm sure I'm missing something very easy here. Pretty much any internet search for a Timepicker for C#/WPF points to this webpage: http://jobijoy.blogspot.com/2007/10/time-picker-user-control.html and as such I figured it would work correctly. However, when I copy/paste this into a user control and run it, the control shows up as it sh...

WPF: Inserting an Image element which should default to its own size

For some reason when I use <Image ...> in WPF, the image is shown smaller than its actual size. There is plenty of space for the image, it's just that it takes up all the space it can by default: <Image Source="data/images/my-image.png" /> I tried setting Stretch="None" but when I do that, the image is displayed smaller than its actua...

WPF Binding Enum to Command Parameters

I am trying to bind a Enum to CommandParameters of a button. This cannot be static due to the fact that the button occurs in a ItemsControl. Here is the Datatemplate: <DataTemplate> <Button Command="{Binding MyCommand}" CommandParameters="{Binding MyEnumParameter}" Text="{Binding MyText}" /> </DataTemplate> I am not sure what I n...

ListBox selected index color wpf

I am just starting with WPF and I have this ListBox that displays an attribute from a class I made. I have to programmatically change the selected index, when I do something like: ListBox1.SelectedIndex = 4; the selected index is changed and highlighted gray, but if I click on it, the selected index is blue. Is there something els...

WPF ListView Nested Tables with Matching Columns

I have a business entity like so: public class Entity { public string Name; public string Description; public Entity Parent; public ObservableCollection<Entity> Children } I would like to bind a ListView to a collection of Enities and get a nested table out of it like this: http://leeontech.wordpress.com/2008/03/11/li...

Designing a simple Save Dialog in Prism

I am writing an application using Microsoft's Prism framework and I'm having trouble working out the best way to approach a simple 'Save File' style dialog box. NB: I can't use the standard dialog as I'm not saving files to the file system so need to write something similar from scratch. So here are the main controls I have for my dialo...

How to use AMFPHP functions from .NET WPF application?

How to use AMFPHP functions from .NET WPF application? ...

How to insert copyright, trademark, service mark, etc. into WPF textbox when font doesn't support symbols.

We have a WPF application that displays text containing the various corporate symbols; such as trademark, registered trademark, copyright, and service mark. The database has some fields that include the standard corporate symbols. Initially, the data was marked as follows: Example Corp(TM) or Example Plan (SM) We can easily change t...

WPF ComboBox SelectedItem

Ok been working with WPF for a while but I need some help. I have a combobox like below: <TabControl> <TabItem Header="1"> <ComboBox ItemsSource="{Binding MyList}" SelectedItem="{Binding MyListSelection}"/> </TabItem> <TabItem Header="2"/> </TabControl> Whenever I move away from tab 1 and then come back to it the selection ...

Help!!! with RibbonWindow.

Hi i am beginning working with the ribboncontrolslibrary, when I run my app the title bar looks like W98 app =( , how can I make it look pretty? Edit: It seems that has something to do with the theme used on windows. any help would be appreciated. <r:RibbonWindow x:Class="Produccion_Dampers.main" xmlns="http://schemas.microsoft.co...

How to snap to the values on a WPF slider, but only show a tick for some of them...

I have a WPF slider whose minimum value = 0 and maximum value = 50. I want to show ticks at an interval of 5, but have the slider snap at an interval of 1. Is this even possible? ...

WPF Threading question

Say I have two usercontrols, UC1 and UC2. A user selects something in UC1, which takes some time so the process is threaded off. UC2 needs to update its view and do some work of its own on another thread when UC1 finishes. But UC2 is dependent on the output of the UC1 background thread so it has to wait until that thread is finished b...

What is the Silverlight 3.0 equivalent for BasedOn="{StaticResource {x:Type TextBlock}}"

Hi, I am trying to extend a base style for a TextBlock. Simple think in WPF world, should be the same in Silverlight. But I get a error on x:Type. How can I translate BasedOn="{StaticResource {x:Type TextBlock}}" in Silverlight. Anyone out there who achieved this ? Thank you. ...

Drag Drop Within WPF ToolWindow in VS2010 Extension Not Allowed

I have a strange problem here. I've created a simple plugin using the wizard for a Visual Studio Integration Package / VSIX project with a tool window. Within that window I want to do a simple drag/drop from a listbox and drop within the same window. I've done the same thing in a normal WPF program, but when I do this in a WS toolwindow ...

XamlParseException when databinding a ComboBox to a statically-defined array in XAML

I've been trying to solve this problem for over an hour now, and can't figure it out. Hopefully someone can see what I'm doing wrong. I have two separate projects, both of which populate a combobox with an array of Doubles in the UserControl.Resources section, then databind to it in the GUI. What I'm doing is essentially just this, wh...

WPF - Have a list source defined at runtime but still have sample data for design time

I have some ListBoxes in my WPF app. I would like to be able to view how the design looks with out having to run the app. But I still want to be able to bind to ItemsSource to my View Model. I know I saw a blog post on how to do this, but I cannot seem to find it now. To reiterate, I want dummy data at design time, but real data at ...

WPF equivalent to ActiveControl?

In Forms, I can simple use ActiveControl.name to get the name of the active control. However in WPF this doesn't work. What is the WPF command equivalent to Activecontrol.name? I'll take C# or VB, either way. Thank you! ...