I've created a custom layered WPF window with the following properties:
AllowsTransparency = True
ShowInTaskbar = False
Background = Transparent
Topmost = True
Icon = "Icon.ico"
I've added Icon.ico under "Project Properties"->"Application" tab.
The icon displays as the default WPF window icon if ShowInTaskBar is false, but displays ...
I have a window Icon property set as :
Icon="..\..\Images\Project_32.png"
The build action is Resource, the png is included in my VS Studio project, and it works fine since that is the png's relative location from this window.
In Adam Nathan's WPF Unleashed (what a great book!), he states that "if you put [the image] in an images fo...
Hi,
I am wondering how you would convert the date and time from 20100131022308.000000-360.
I've been trying to figure it out for a while now and I can't seem to get anywhere.
I am using C# in a WPF Application.
...
I have a ListView in my WPF app that is bound to a collection of tasks to perform (A to-do list). I want the user to be able to print their list and have created the following code based on the MSDN guidelines. (This my first foray into printing)
public FlowDocument GetPrintDocument()
{
FlowDocument flowDoc = new FlowDocument();
...
Hello,
i noticed that the WPF Ribbon is bound to a XAML Usercontrol or window.
Lets imagine i have a windws.xaml page with a WPF Ribbon at the top.
I want to create an instance such that once i click on one of the WPF Buttons, i am taken to a different XAML UserControl or "page". How do i do this?
Will this new page have the WPF Ribb...
So I have a TreeView like the one below, with certain items being hidden. If I try to go through the tree using arrow keys, I get stuck at the items surrounding the "collapsed" items. Try it yourself.
<Window x:Class="Example.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.mic...
The title may be a little unclear, I wasn't sure how exactly to describe the problem.
I have a gridview displaying a list of notes on particular customers. It uses a linqdatasource to retrive the notes to display from an SQL database. One of the columns in the gridview is an 'Assign To' column, where you can select a user to assign that...
Using the Composite Application Guidance tools from Microsoft, It seems as if there is no mechanism to allow you to query your modules ViewModels and ask if any of them have unsaved data. This is a problem because, and I'm guilty of this as well, you cannot stop the application from terminating when there is unsaved data...
I had thoug...
Kind of an odd question- if I'm thinking of this the wrong way please let me know. I am using an infragistics dock manager, which manages tabs as well. So I can create a TabGroupPane, and then add multiple ContentPanes, each of which has its own tab.
In each content pane, I set my viewmodel:
<ContentPane>
<viewmodels:MyViewModelFor...
I'm trying to create a layout similar to this:
Here's the code I have:
<StackPanel TextBlock.FontFamily="Segoe UI" Orientation="Horizontal">
<StackPanel HorizontalAlignment="Stretch" Width="Auto">
<TextBlock Padding="5,0,5,0" FontSize="12" FontWeight="Bold" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, P...
How to control the Visibility of a textbox with radio button "IsChecked" property?
I have a Two textbox's let say txtbox1 and txtbox2 and I want to bind the visibily of both these textboxes based on the radio button IsChecked property. Below is the XAML code I am trying with:
<RadioButton
x:Name="radioBtn"
...
I have a business object project, which contains composite structure:
public class Tree
{ public IProductComponent TreeRoot { get; set; } }
public interface ITreeComponent
{ public string Name { get; set; } }
public class ContainerComponent : ITreeComponent
{ public BindingList<ITreeComponent> Children { get; set; } }
public class ...
when i bind one combobox with other combobox items... with the following code
<ComboBox ItemsSource="{Binding ElementName=cbo1, Path=Items}" Name="cbo2" />
it works fine but when i select something from cbo1 and come back to select something in cbo2.. it doesn't list anything nor cbo1 does...
what could be wrong?
...
Should you use CollectionViewSource in the WPF Custom Control's code behind?
I'am asking because the CollectionViewSource.GetDefaultView(SOURCE) with .Filter set
changes the view so that all instances of the Control have the same view.
Doesn't it mean, that in the Custom Control's code behind, you should avoid use of CollectionViewSou...
How to close the WPF Popup in a WPF Control if clicked outside the Popup area or if the Parent Control is moved ?
I cannot check it from the Parent Control, Everything must be done by the control itself.
...
Hi,
General question. I have a ControlTemplate that is reasonably complex. Several TextBoxes etc.
I can't use TemplateBinding to bring all the properties to the surface so that I can set all the styles.
Is there a way for a Style to 'delv' into the controls within a control to set values?
Hope my question is clear without an example...
Hi,
Say I have a WPF XAML code as below
<Grid>
<Grid.ColumnDefinition>
<!--2 Columns are defined-->
</Grid.ColumnDefinition>
<Button x:Name="button" Grid.Column="1"/>
<ListBox x:Name="listBox" Grid.Column="2"/>
</Grid>
Now, each listboxitems are bound to an object of a class with a member named "Stat...
Hi All!
I wanted to create a control with a TextBox and to bind TextBox.Text property with my own Dependency Property TextProp. (Some kind of experiment) However, the binding does not work! What I am doing wrong?
XAML:
<UserControl x:Class="WpfApplication1.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/20...
I want to add windowsform usercontrol to wpf usercontrol.
how to do that?
...
I use MVVM.
Is there any convenient way not to have xaml.cs files but somehow still calling InitializeComponent()?
...