I am developing a unit converter for my semester project. I need some help on the structure of the classes/interfaces/abstract classes. I want some interface or abstract class that can be inherited by classes (DegreesConverter, MassConverter, LenghtConverter). Like maybe interface IUnitConvert<Type>. I will be dealing with units of angle...
I want to replace
<Button Text="Foo" Command="{Binding Foo}">
<Button.CommandParameter>
<System:Boolean>True</System:Boolean>
</Button.CommandParameter>
</Button>
with something like
<Button ... CommandParameter="{???}"/>
...
Hi,
I have an BitmapFrame object created by a working thread (not UI thread) and placed in a static collection.
then, I have a different working thread assigning this object to an Image object owned by the UI thread.
As you can imagine, I can't access the Image object (As it belongs to the UI thread) and I get: "calling thread cannot ...
I have a Grid with 2 rows.
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="150"/>
<RowDefinition />
<RowDefinition Height="Auto" x:Name="OtherContactsRow" />
</Grid.RowDefinitions>
Something here
</Grid>
and 2 storyboards
<Storyboard x:Key="MaximizedStoryboard">
<DoubleAnimation From="...
I'm working on a UI for a simple inventory system. The users will use a USB barcode scanner to retrieve an ID and then either retrieve information from the database about the scanned object or enter the new information. This will only be used within our corporate environment. I can't decide which is the best way to go with this. I would ...
There is a relatively simple thing I'm trying to achieve but I'm unsure how to do it. Basically, I have a CLR class as follows:
class SomeClass
{
public SomeEnum Status;
}
public enum SomeEnum { One, Two, Three };
I've got a DataGrid that I'm binding an ObservableCollection<SomeClass> programmatically through the code-behind. In ...
<Window.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="FontFamily" Value="Times New Roman" />
<Setter Property="FontSize" Value="30" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Background" Value="#FFCA5132" />
</Style>
</Window.Resources>
This aboved code looks...
Hi!
I'm no designer and can't get a custom design done. I would love it if there were basic but attractive free or cheap WPF designs available much like the wide-spread Wordpress Themes.
Any URLs out there?
Thanks!
Gregg
PS A nice WPF Design by Felix Corke on Scott Hanselman's blog
...
Hi all
I cannot change fontfamily or fontstyle for title of Window Form even though I have already set these properties.The default fontfamily is MS UI Gothic and I want change to meiryo.At XML file, It seems ok but It doesnt have any changes at runtime.
<Window x:Class="TestFont.Window1"
xmlns="http://schemas.microsoft.com/winfx/2...
Hi,
I am trying to validate a textbox to enter only numbers and set maximum and minimum value in wpf.
I want to do it with the dependency logic....
Can anyone help me with some sample code or project for that?
...
Hi,
My application presents an image that can be scaled to a certain size. I'm using the Image WPF control with the scaling method of FANT.
However, there is no documentation how this scaling algorithm works.
Can anyone reference me to the relevant link for this algorithm description?
Nir
...
I want my WPF Button to get an outer glow effect when the mouse hovers over it. How can I achieve this when the Button is transparent.
When I use a BitmapEffect such as a DropShadow or OuterGlow the glow appears at the inside of the Button as well because it is transparent. But I want the glow to be only at the outside.
...
Greetings,
a simple WPF question.
I would like to have a button with content="<" (the "backward button")
How to I achieve this because the following wrong:
Content="<"
...
In WPF app I use LINQ query to get values from ObservableCollection and update the state of some objects:
var shava = from clc in _ShAvaQuCollection where clc.xyID == "x02y02" select clc;
switch (shava.First().Status)
{
case 1:
x02y02.Status = MyCustControl.Status.First;
break...
I have strange problem with WPF custom control that I have made. When I drag and drop WPF custom control from toolbox to design surface I only see one border without any controls in it... I have another same WPF custom control project with same custom control and same code and when I reference that project everything works fine.
I have ...
Took over an XBAP browser application. XBAP was chosen over HTML for some clipboard actions, and the application was well received.
Recently a user asked why he cannot select screen text (and copy to clipboard) like a regular HTML page. Wow, didn't see that coming, but totally understand where they are coming from.
The XBAP applicati...
I have built a small WPF application that allows users to upload documents and then select one to display.
The following is the code for the file copy.
public static void MoveFile( string directory, string subdirectory)
{
var open = new OpenFileDialog {Multiselect = false, Filter = "AllFiles|."};
var newLocation = CreateNe...
I have a XElement that has the following structure
<document num="1">
<pages>
<page />
<page />
</pages>
</document/>
I have one Listbox named "documents" that is bound to an XElement in the following manner:
ItemsSource="{Binding Path=TheXElement.Elements[document]}"
I want to have a second ListBox named "pages" whose Ite...
Hi,
I am stucked at the part where I have to bind a collection to a dynamic usercontrol. Scenario is something like this.
I have a dynamic control, having a expander , datagrid, combobox and textbox, where combox and textbox are inside datagrid. There are already two collections with them. One is binded with combobox and another is bind...
I am planning to create a WPF application with a main window which would launch various WinForms. Some of the WinForms use the System.Windows.Forms.Application class (DoEvents, Application.Path, etc). Do you think that there will be a problem in doing this?
Can I still use System.Windows.Forms.Application.DoEvents() from a WinForm that ...