I'm working with WPF, and trying to implement a form to receive a Drag and Drop link, and assign to a button on a record (attach links to files to a record).
I can get the link path with no issue. I'm stuck trying to extract the icon file from the link, and convert and render it.
private void frmMain_Drop(object sender, DragEventA...
Hi Everyone,
I have 2 listboxes, same size, next to each other. Basically I am using them to represent linked items...Similar to having 2 columns and a number of rows in excel, with say, first name in one and last name in the other.
I am wondering if I could make it so that when one listbox is scrolled, the other listbox scrolls in syn...
What is wrong with DataTemplate x:Key="CellTemplate" not reaching the DataContext of the Grid's ContentControl?
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="WpfApplication1.Page1">
<Page.Resources>
<XmlDataProvider x:Key="x...
When i create a user control that has a CommandBinding to a RoutedUICommand im worried that i get memory leaks.
scenario:
Have a RoutedUICommand as a static in c class where i store my commands
Implement the CommandBindings on a user control.
Add the user control to the main form.
Remove the user control from the main form, set the re...
I want to position a modal dialog (progress window) at the top right corner of the parent window client area.
This code will put it in the corner of the non-client area, but how do I calculate the offset to the client area?
this.Owner=owner;
this.Left=owner.Left+owner.ActualWidth-Width;
this.Top=owner.Top;
Edit:
I found this 'soluti...
Hi,
I have a tab control in the WPF application. Inside the tabcontrol each tab item consists of so many check boxes and buttons. Each check box when it is clicked, in background with a new thread, some operation is going. Till that completes tabcontrol's isHitTestVisible is made false, so that any other click should not happen. But now...
Hello all,
a web service is running with IIS.
When calling the initialize service, some libraries are dynamically loaded in order to start a wpf application.
The code compiles, runs... but the window never shows up. No exception is thrown whatsoever.
Below is the code that is executed to create the WPF application:
public void Start(...
Hi all,
I'm using WPF and an Hyperlink control with
<TextBlock Margin="98,190,116,133.418" FontSize="14">
<Hyperlink Name="hyperlink" RequestNavigate="Hyperlink_RequestNavigate">
Click here
</Hyperlink>
</TextBlock>
this is working, but I would like to set the "click here" value by code, but I'm u...
I have a custom control which has a string Description dependancy property as shown below:
<CustomControl>
<CustomControl.Description>
Hello World
</CustomControl.Description>
</CustomControl>
This description is bound in several places in TextBlock's as shown below:
<Button>
<Button.ToolTip>
<TextBlock Te...
I have a WPF application which contains a WebBrowser control.
Currently, the user can select something within the WebBrowser and can copy the content by dragging it out to another application and dropping it there.
I'd like to be able to stop the user doing this. I'd assumed that there would be a "DragStart" event that I could capture...
I have a WPF window that goes fullscreen, and I have made every attempt to make it truly fullscreen. WindowStyle is None, WindowState is Maximized, Topmost is true, etc. I even used p/invoke to hide the taskbar when the window is loaded and make it appear again on exit. The problem I have is when, for example, I play a video that replays...
Hi All,
I've got a listbox that contains a list of objects (lets say addresses)
The list box items source is bound to this observable collection
<ListBox x:Name="listDetails"
ItemsSource="{Binding}"
...
Then i've got a text box, this is bound to the name fild of the current object
<TextBox x:Name="textBoxName" Text="{Binding Name...
I need to access and present the information from Windows Media Player library, from my C#/WPF application.
How do I do this programmatically in C#/WPF?
...
I followed this small "tutorial" on how to add a scrollbar to an ItemsControl, and it works in Designer view, but not when I compile and execute the program (only the first few items show up, and no scrollbar to view more - even when VerticalScrollbarVisibility is set to "Visible" instead of "Auto").
Any idea on how to solve this?
Th...
The buzword in Linq now days is "unit of work".
as in "Only keep your datacontext in existence for one unit of work" then destroy it.
Well I have a few questions about that.
I am creating a fat client WPF
application. So my data context needs to track the entire web of instantiated object available for the user on the current screen. ...
I am using System.Windows.Media.FormattedText to do some low level rendering (specifically, trying to render math equations in a typographically pleasing manner). For this, precise metrics on the text blocks I am using are critical.
I am creating several FormattedText objects and using these at the lowest level of rendering. The proble...
I have an ObservableCollection of ViewModels that are sitting in a WPF DataGrid. The DataGrid has three columns:
Position column; this is rendered at runtime by a UserControl that displays the position of the row in my DataGrid
Name column; this is rendered at runtime by a UserControl that displays the name of the column (yes, I need a...
Hi!
I'm currently creating a MSPaint-like WPF-application and struggling with the implementation of a snappable grid.
The painting of the grid is no problem with a VisualBrush and a Rectangle but the problem is that these lines are then purely for looks and can't be easily changed (for example highlighted when the snapping to a specif...
I have good model (I think!) for how to allow a user to drag an element in a stackpanel and reposition it to another location within the stackpanel.
However, my Stackpanel is placed within a ScrollViewer, like this (generalized):
<ScrollViewer>
<StackPanel>
....First item
....Second item
....Third item
...
In WPF app I have a ListView which is connected with ObservableCollection ShQuCollection through databinding:
<ListView Name="ShSelList" ItemsSource="{Binding Source={StaticResource myDataSource},Path=ShQuCollection}" SelectionChanged="ShSelList_SelectionChanged">
<ListView.View>
<GridView>
<GridViewColumn Header="Co...