In my WPF project I have a custom control which is visually represented by a rectangle object. In XAML I put a number of rectangles based on this custom control. User should be able to select a group of these rectangles by mouse clicks and then do some actions with these selected rectangles.
How I should implement the possibility of sel...
I'm trying to learn the MVVM pattern. The main problem I'm having is learning where I should be declaring, creating and binding command objects.
2 examples:
I have a main form that acts like a switch board or main menu. Selct button 1 and View 1 is displayed, Select button 2 and view 2 is displayed. Great. Now I want to go back to...
If I have developed a user control as mentioned in the tile and I use this http://www.ikvm.net/ to convert my .dll to a Jar file, Can I then embed that control on my JFrame? If so can you give an example please.
...
I have assembly that targets .NET 2.0 to be compatible with a broad range of applications. When used with a desktop application (either winforms or WPF) I want to hook certain hotkeys and popup modeless dialog windows. The tricky bit is finding a solution that can be implemented under .NET 2.0 that is compatible with WPF.
For winforms...
Hope someone can help.
I have a simple scenario where clicking checkboxes is driving a progress bar in WPF. The checkboxes are contained in a UserControl and the Progress bar is in a simple WPF client window.
On the user control I am using two dependency properties:
1) the existing Tag property has the value I wish to bind to the progres...
This is a simple WPF window in XAML:
<Window x:Class="AnimateTest.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300"
x:Name="MainWindow"
Style="{StaticResource TestStyle}">
<Grid>
</...
After custom control is created there automatically appeared file for C# code - MyCustomControl.cs:
public class MyCustomControl : ContentControl {
static MyCustomControl( ) {
...
DefaultStyleKeyProperty.OverrideMetadata(typeof(MyCustomControl),
new FrameworkPropertyMetadata(typeof(MyCustomControl)));
}...
For an intranet web application with 5000+ users we need to develop highly interactive (as few postbacks as possible) client. So performance issue might arise. What would be your choice and why?
- ASP.NET Web Forms + JQuery/Ajax
- ASP.NET Web Forms + Silverlight
- ASP.NET MVC + JQuery/Ajax
- ASP.NET MVC + Silverlight
- WPF
...
I've been trying to animate around 1000 lines which are all added to a Canvas, and it is extremely slow to the extend that animation is not feasible at all. At first I thought it was probably because of all the calculations, but then I tried a very simple experiment.
I generated around 1000 random lines and I tried to move them to new r...
Hi
In WPF, I want to get the corner location of a TabControl in my code, so I can set a ToolWindow's location accordingly when shown.
How do I get the location of a given UIElement ?
buildingInfoWindow = new BuildingInfoWindow(); // BuildingWindow : System.Windows.Window
buildingInfoWindow.Owner = this;
//buildingInfoWindow.Left = ?;...
hi
I am trying to populate a treeview using mvvm but the tree does not display any data.
I have a Employee list which is a property in my vm which contains he employee data.
the xaml is as follows.
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="FontWeight" Value="Norma...
I would like to have some text to be inside a rectangle with stroke around this rectangle (just like property "Stroke" of the object "Rectangle" itself). But I didn't manage to find a property of the object "Textblock" wich defines such a stroke.
...
Hi, I need to set the font family for the next text to be written in a RichTextBox.
I tried setting that with...
<RichTextBox x:Name="RichTextEditor" MaxWidth="1000" SpellCheck.IsEnabled="True"
FontFamily="{Binding ElementName=TextFontComboBox, Path=SelectedItem}"
FontSize="{Binding ElementName=TextSizeComboBox...
I have a custom control with a TextBlock inside it:
<Style TargetType="{x:Type local:CustControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:CustControl}">
<Border Background="Blue"
Height="26"
Width="26...
Hello
The view below is a container for three user controls, and I started getting this error after refactoring application resources:
Error 295 Could not create an instance of type 'FilterPanel'. C:...\ProjectPickerWindow.xaml
Here is the xaml for the view:
<Window x:Class="Smack.ConstructionAdmin.WpfPresentation.Views.ProjectPic...
I'm working on a chat client using the .NET Framework 3.5 and WPF. I use a TabControl to handle multiple chat windows. Inside each tab, I use a FlowDocumentScrollViewer to display the chat log. When content is added to the chat log, I call ScrollToBottom() on the ScrollViewer (unless the user has moved the scroll bar away from the bot...
In Xaml page I reference my custom control this way:
<MyNamespace:CustControl x:Name="Cust1" />
Now I want change the property of this custom control in MouseLeftButtonDown event trigger:
private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
}
But when I try to write something like
CustControl.Is...
I'm kinda new at XAML and I'm trying to figure how to display the TreeView nodes horizontally instead of vertically, i.e
Header 1
Item 1 Item 2 item 3
Header 2
Item 4
Instead of
Header 1
Item 1
Item 2
Item 3
Header 2
Item 4
It's not really as simple as it seems, I was able to get the headers to go horizontally thou...
In my WPF project I have a custom control with some properties assigned, they are of "string" and "bool" types. Something like:
public class CustControl : Control
{
static CustControl()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(CustControl), new FrameworkPropertyMetadata(typeof(CustControl)));
}
public ...
I wish to implement a audio visualizer widget (similar to what Winamp has) in WPF. How would I approach this problem?
...