I've created a style for buttons in my WPF application.
However, on Vista, when a button is focused, it pulsates with a light blue that doesn't look good in the design.
How can I override this automatic pulsating?
<Style x:Key="NavigationButtonStyle" TargetType="Button">
<Setter Property="Width" Value="400"/>
<Setter Property=...
I have read in two different books that in WPF, the ToolBar.Header property doesn't do anything:
Windows Presentation Foundation Unleashed by Adam Nathan, pg. 119
Pro WPF with VB 2008, pg. 650
However, I'm creating my ToolBar objects dynamically like this (tbtToolBar is actually a ToolBarTray defined in the Xaml, vm is the window's V...
In my ViewModel, I want to build a collection of Page objects from this list of page names:
private string[] pageNames = {
"Introduction.xaml",
"Slide1.xaml",
"Slide2.xaml"
};
How do I instantiate them dynamically, e.g. something like this:
foreach (string pageName in pageNames)
{
//PSEUDO CODE:
Page thePage = new...
Hi, I have searched around and it seems very easy to bind enums to combobox, just retrieve Enum values as a list of strings via an ObjectDataProvider from the static Enum.GetValues method, however i can't get it to work. The error is Type ContactExportType was not found.
I have an enum called ContactExportType, it resides on Enums cl...
I have a TextBox and a Popup control. I want the popup IsOpen property to be bound to the TextBox IsFocused property. In other words, if the textbox has focus, the popup is open. Alternatively, if the popup is in focus, I don't want it to close due to the textbox losing focus. I was hoping to handle this using bindings rather than havin...
Hi,
does anyone know if views states (used in silverlight) will be available in next version of wpf?
...
With the new Silverlight 3.0 feature that allows the components to be hosted outside of the browser, our company is looking for details on the differences between this new feature and WPF Windows applications (since Silverlight is partly a subset of WPF).
Is there a good resource that lists the differences between Silverlight 3 outside ...
I've got a wrapPanel surounded by a ScrollViewer. The WrapPanel can hold 1-n images. When the number of images in the wrap panel is more than the ScrollViewer can show, the ScrollViewer shows its up/down scroll buttons.
But the buttons are both at the top of the scroll bar, and I get no scroll bar. This is shows in the picture, highl...
I have this block of xaml that allows the text of a hyperlink to wrap around nicely:
<TextBlock>
<Hyperlink TextDecorations="None" Click="DoSomething">
<TextBlock TextWrapping="Wrap">
Click this text that is really rather long and overly descriptive in order to do something.
</TextBlock>
</Hyperlink>
</TextBlock>
It ends u...
I have a GUI that is going to do a lot of disparate tasks. I currently have these separated in a tab UI. The functionality that does all of the heavy lifting is split into separate classes, but what is left still looks like a mess. How do you organize the GUI functions in code so that everything is coherent? I'm working with WPF specifi...
I've created a CloseableTabItem control that derives from TabItem.
Now I'd like to specify that a given TabControl should add new items using CloseableTabItem instead of TabItem.
Is this possible? How?
...
Hi,
Can anyone explain how is dependency property implemented? Is it just a static dictionary that is declared in base class with a reference of given instance as a key?I can't find any resources about this in internet...Thanks a lot
...
i have a listbox with images. I want know about number of times the same added to the listbox. Any solutions for that. plz tell me
Thanks in advance
...
Hi,
Is there any way to change the icon of an application after it is launched? I want to change the icon to reflect a notification.
Thank you
edit:
Wpf solution based on Fredrik Mörks answer.
Uri iconUri = new Uri("icon1.ico", UriKind.RelativeOrAbsolute);
this.Icon = BitmapFrame.Create(iconUri);
...
I have a listbox with images. I want to select and deselect all the images in that listbox at once. I am using radiobuttons for that. one radio button is for selecting all the images in listbox and another radio button is for deselecting all the images in listbox.
Can any plz help.
Thanks in advance.
...
I want to display numbers i thousand separated format. Numbers are displayed in a Column of ListView control. I've the following xaml code, but it doesn't even compile!
<GridViewColumn Header="Total" DisplayMemberBinding="{Binding PaidValue, StringFormat={0:0,0}}" />
From my c# point of view, {0:0,0} is a correct format to do thi...
I have created wpf application with listbox having some images. Now what i want is if i inserted usb or cd into the system having some images my application has to start automatically once i inserted usb or cd having images and application has to ask whether to add those images of usb or cd to the application by default.
Any source code...
When should the Windows Registry be used for per-user state, and when should we use the filesystem, particularly the user's AppData folder? (eg, C:\Users\USERNAME\AppData). Where does Isolated Storage come in?
Is there a pretty firm rule, or is it just a fuzzy thing, like "use the registry until it becomes too much data to store in the...
Hi just about to get the dev team to start looking at the next version of a CRM type SOA based application and the thorny issue of Application Front End came up.
Currently the application is a composite application using
Web Forms (.net2)
Sharepoint 2003
InfoPath *
BizTalk
*Not FormsServer though - was before FormServer as we hack...
I am trying to save images in wpf application, but after saving some reddish tint color is coming on that images and also losing sharpness of those image. I am using PNGBitmapEncoder for that and saving imags in PNG format. I dont know what is happenning.
Anybody Plz give me the solution.. I am trying from so many days. Plz help me rega...