I have a collection of Company objects contained in a CompaniesCollection which is inherited from Observable Collection. Via a CollectionViewSource, I am displaying these Companies in a list box. One of my requirements is that each company item must show the City and State of the first Address (of a collection of Addresses) attached to...
I wanted to group a number of toggle buttons and have them behave as radio buttons. So what I did was add radio buttons to my xaml and created the following style:
<Style BasedOn="{StaticResource {x:Type ToggleButton}}" TargetType="RadioButton">
<Setter Property="FontFamily" Value="Arial"/>
<Setter Property="FontSize" Value="12"/>
...
.net 4 wpf, microsoft ribbon control library, how do I hide, or disable, the RibbonWindow icon so that users can't double click it to close the window/application? I handle the window closing event, but if the end user double clicks the icon it closes the window even if I set cancel to true within the closing event handler.
...
Hi, does anyone have a functioning virtualising WrapPanel I can use in a WPF application?
I have downloaded and tried the implementation at http://virtualwrappanel.codeplex.com/. However, I get the following exception:
"Layout measurement override of element 'MyNamespace.VirtualizingWrapPanel' should not return PositiveInfinity as its...
Why doesn't this simple Style work for a TextBox? I expect the background/foreground colors to change when I change the text between "0" and "1" ...
<Style x:Key="TextBoxStyle" TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="Gray"/>
<Style.Triggers>
<!-- If the T...
I'm relatively new to WPF. I'm examining some code that looks like this:
private void button_Click(object sender, RoutedEventArgs e)
{
//Queue on dispatcher in the background so it doesn't make the UI slow
Dispatcher.BeginInvoke(new dMyDelegate(PerformOperation), DispatcherPriority.Background);
}
From the comment, I'm gue...
I have a TextBox control within a StackPanel whose Orientation is set to Horizontal, but can't get the TextBox to fill the remaining StackPanel space.
XAML:
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml...
Hi,
I am writing a WPF application where where i need to display custom file iformation which consists of field name & its value. I generate a grid rumtime with label & textboxes. I display the field name in label & field value in textbox(i want it to be editable). & each time file selection changes, number of field change & so the grid...
This has been bugging me for a long time now and I can't seem to find a good explanation for it. What is the purpose of the brackets in this markup? Is it a XAML shortcut for casting? Why does it only seem to be used for animations?
Storyboard.TargetProperty="(TextBlock.RenderTransform).(RotateTransform.Angle)"
If anyone has an
...
Hi there. I am having some issues with WPF not fully repainting a button control when the button is changed from another thread, and I am not sure how to force it to do a full repaint.
The situation is that on receipt of a message (via WCF - but the source isn't important, except that it is an external thread) I update the foreground ...
I am using the WebBrowser in WPF like this:
<WebBrowser
Name="SSSBrowser"
Margin="8,4,8,8"
Grid.Row="1"
dp:WebBrowserUtility.BindableSource="{Binding WebAddress}"/>
And in C# I am loading it simply, for now, like this:
private string _webAddress;
public string WebAddress
{
get { return "http://w...
I have a wpf application and I created a logon window which is used to build the application's connection string. I am having issues closing the first dialog and spinning open the MainWindow behind it. I think a close event is bubbling out of the logon dialog and getting stuck in the MainWindow because as soon as I create the MainWindow ...
I have a datagrid with a template column. The template has an image:
<Image HorizontalAlignment="Left" Name="ImageProduct" Stretch="None" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" Source="{Binding Path=ProductImage, Mode=OneWay}" RenderOptions.BitmapScalingMode="Hi...
Currently, I have this in MainWindow.xaml:
<Image Name="LogoImage" />
And this in MainWindow.xaml.cs:
public ImageSource LogoImageSource { get; set; }
....
var rm = new ResourceManager("Project.Properties.Resources", GetType().Assembly);
var logoBmp = (Bitmap) rm.GetObject("CompanyLogo");
if (logoBmp != null)
{
var hBitmap = l...
Hi there,
I want to build a WPF web application that could installed on a user's computer. So any hosting requirements would be subject to whatever configuration the user has. What are there requirements to host a WPF application?
Can any OS be used?
Is it required that the .Net framework be installed on the machine?
Obviously some we...
Firstly let me clarify (if the title wasn't clear enough): I'm discussing System.Windows.Controls.DataGrid from the .NET 4.0 Framework, not the toolkit edition.
I'm currently building up a small re-usable set of classes/view models/etc in my project to build a rather powerfull DataGrid for my application.
Now, by default given an IEnu...
I have a XamDataGrid in one of my user controls, inside of a stackpanel. I want the grid to maintain the same height regardless of how many rows are present in the grid. To do that, I set the grid's Height property to an explicit value.
Is that how things are done in WPF? Every time I do explicit sizing I feel like I am doing WinForm...
Hi
I create a contextmenu dynamicly using this code
protected MenuItem itemAdd, itemDelete, itemSelectBranch, itemDeleteClasp;
protected MenuItem itemCut, itemCopy, itemPaste, itemAddParent, itemPasteWithChildren;
protected MenuItem itemAddTask, itemAddExtTask, itemAddMileStone;
menu = new ContextMenu();
itemAdd = ne...
Hey.
I accidently deleted by App.xaml and App.xaml.cs files in my blend 4 project.
So I made a new one successfully - however now when I go to run the app it says :
ok done that thanks, now it says Program " does not have a static main method suitable for an entry point.
How do I make its main method - where should it exist , and wha...
Hi
I recently downloaded trial version of Microsoft Expression Blend and I can't figure out how I can draw polygons. I only found predefined shapes like pentagon,octagon, triangles but I can't find a tool to draw polygon
...