Hello Everyone,
I am trying to update an Image (_browserScreenshot below) object in XAML by changing the source image every time an event determines the source needs updating. Right now I have this:
public BitmapSource GetScreen()
{
Bitmap bitmap = new Bitmap(app.Browser.ClientRectangle.Width, app.Browser.ClientRec...
Here is the exact error I got.
The favicon.ico has been added in the project as a resource and I have set to "Resource" the Build Action.
I found some solution that require to add some code. My question is why I can't do it with the Visual Studio Interface?
...
I'm trying to bind DataColumn Header to DynamicResource using following code.
<Window.Resources>
<sys:String x:Key="HeaderText">Header Text</sys:String>
</Window.Resources>
<Grid>
<tk:DataGrid>
<tk:DataGrid.Columns>
<tk:DataGridTextColumn Header="{DynamicResource HeaderText}" Width="100"/>
</tk:DataGr...
I want to show data in a wpftoolkit datagrid where the data is a collection of
public class Thing
{
public string Foo { get; set; }
public string Bar { get; set; }
public List<Candidate> Candidates { get; set; }
}
public class Candidate
{
public string Name { get; set; }
public CandidateType CandidateType { get; se...
What I want:
To be able to resize the actual video inside the SL player with JS as I drag the corner.
What I have so far:
http://resopollution.com/granicus/silverlight_test/test_silverlight.html
(try dragging the corner, it crops the video, not resizing the video). I'm using jquery to dynamically resize the outer div and the OBJECT tag ...
Would prefer an answer in C#, .Net 3.5 using WPF (Windows Forms also okay)
I have an application that is essentially a toolbar window or tray icon. It needs to detect if a user locks his/her workstation and walks away in order to update the person's status in a centralized system.
I can detect a session switch or a logout easily enoug...
Below I say "DockPanel.Top" on Menu but it docks in the middle. (?)
If I take the Height attribute out of Menu it docks on top but is about 200px high. (?)
I thought that was what LastChildFill was for.
How can I get this child element of DockPanel to dock on the top with no other items in the dockpanel?
<Window x:Class="TestContain...
I have a custom ListBox which uses a custom Panel as ItemsHost. I want to have control over mouse wheel input, so that turning the wheel changes the single selected item.
I believe that the best method to do so is to handle the OnPreviewMouseWheel event (although this is only have what I want since it doesn't provide horizontal wheel da...
I Have a wpf Listbox that display's a list of textboxes. When I click on the Textbox the Listbox selection does not change. I have to click next to the TextBox to select the listbox item. Is there some property I need to set for the Textbox to forward the click event to the Listbox?
...
In Window1.xaml I have menu and display area:
<Menu x:Name="TheMenu" Width="Auto" Height="25" DockPanel.Dock="Top"/>
<ItemsControl x:Name="MainContent" DockPanel.Dock="Top"/>
In Window1.xaml.cs I dynamically load in a menu item:
MenuItem menuItemEmployees = new MenuItemEmployees(this);
TheMenu.Items.Add(menuItemEmployees);
In MenuI...
Is WPF expected to replace WinForms in the near future, or is it more of a complimentary technology, intended for applications that have a strong graphical content?
Answers that link to statements from Microsoft will be most appreciated! (I looked already, but could not find anything definitive)
...
Well i have a application that is black and white and i need a function to lower the brightness how can i do this? all the white comes from a SolidColorBrush that is saved in a ResourceDictionary(Application.xaml), my current solution is to put a empty window that is back with 80% opacity over it but this disenables me to use the underly...
What is the WPF analogy for the CSS em unit?
...
I have a menu in my WPF application with multiple options which act like radio button group (selecting one deselects rest of them) and I'd like to use checkable menu items as templates for radio buttons.
I've tried to set the template but it doesn't seem to work like one would expect. Selecting and unselecting items do not seem to be sy...
I have an event trigger that I want to be fired in response to two different routed events. I don't want to repeat the event response code (in XAML) twice. Can I specify multiple routed events for a single event trigger declaration?
Example of a single event:
<Style.Triggers>
<EventTrigger RoutedEvent="Button.MouseEnter">
...
I've made a WPF Browser Application that hosts old WinForms controls (I haven't migrated fully to WPF yet). Using WindowsFormsHost means my Browser App requires Full Trust to run. This is not a problem for me since this app is only meant to be run on the intranet at my company. However, after I deploy the xbap to a network share, it refu...
In my App class, I have a Collection of objects, like this:
(the Collection is in the App class because i need to have access to it application-wide in different windows, etc.)
public partial class App : Application
{
public ObservableCollection<Person> Persons { get; set; }
public App()
{
Persons = new ObservableCollection<Person...
I am trying to make the corners of a Window (WPF) rounded and it doesn't work, I tried to make the window itself transparent and add an internal border with rounded corners and it doesn't work.
any ideas?
...
I am new to styles and need help to create a style for a ListBoxItem that will give the item a transparent background then have the Font turn Gold when hovered over. It should not change the color when clicked and return to normal when the mouse moves off. It must still pass the selected object to the PreviewMouseRightButtonDown event ...
When designing WPF application UI's in XAML, should every container-type control contain a layout control to house all children controls?
Take a group box, for instance. I can either throw controls onto the group box directly, or I can use a layout control and place the layout control inside of the group box and then controls in that. ...