void Start()
{
System.Windows.Controls.Primitives.Popup p = new System.Windows.Controls.Primitives.Popup();
p.HorizontalOffset = this.ActualWidth / 2;
p.Width = 100;
p.Height = 100;
p.VerticalOffset = this.ActualHeight / 2;
DockPanel dock = new DockPanel();
dock.Children.Add(new Button() { Content = "Обновлено...
Hello,
I am using an ObservableCollection to wrap some of my generated entity framework objects.
When the user wants to edit some values , i am opening a popup windows that contains fields, and when the user changes and press save - the changes are saved to the database, and the binded controls are changes as it is an observablecollect...
I have a simple chart with two column series containing all months in the year. I want to filter a list view that show detailed information for the selected month. I can capture the event via MouseDown on the ColumnSeries but I'm not sure how to get to the month in the column series.
<DVC:ColumnSeries Title=" Expenditures" Independent...
We just converted a WPF to VS2010. When I press F5, the solution builds but then does not run.
If I do CNTL+F5 (start without debugging) the app runs just fine.
Any ideas?
Thanks,
jeff
...
Hi,
In my small WPF program I want to show the name of the "background color" of the client area on a mouse click in am message box .... How can I do it?
System : Win7(32-bit)/VS2008
Thanks.
...
I am building an application in the MVVM style where the actual views (UserControls) are stored remotely and hopefully sent via a WCF service to my main application window. I am doing this in order to avoid having the user reinstall the application each time a new view is added. However, when I try to return a User Control from my WCF ...
Hi,
My table contains 2 fields with values,
StartTime EndTime
3/6/2010 8:00:00 AM 3/6/2010 10:20:00 AM
Now I have a datepicker control wherein the user can select a date,
C# Logic:
DateTime SelDate;
if (datePicker.SelectedDate == null)
SelDate = DateTime.Now;
else
...
I have construction:
Grid a = ((((usercontrol.Parent as DockPanel).Parent as ScrollViewer).Parent as Grid)
Is it possible to find a tree or a parent element?
example: Grid a = GetFirstParent(usercontrol,"Grid") Grid - is Type element
...
hello,
my view model creates a BackgroundWorker in its constructor. BackgroundWorker updates the model's properties from its DoWork event handler. The code below is a contrived example (ViewModelBase is taken almost verbatim from the MVVM paper).
public class MyViewModel : ViewModelBase
{
public int MyProperty
{
get
...
I have a process which I break into multiple processes and even when using threading it takes a very long time to complete.
I'd like to give the user an indication of the status of the execution in a cute way.
(for each process % complete)
Maybe betting the right horse will ease the pain :)
I found this project long ago:
http://www.co...
Hello,
I want to filter a ObservableCollection with max 3000 items in a DataGrid with 6 columns. The user should be able to filter in an "&&"-way all 6 columns.
Should I use LINQ or a CollectionView for it? LINQ seemed faster trying some www samples. Do you have any pro/cons?
UPDATE:
private ObservableCollection<Material> _materialLi...
Hi,
I am using the AXDSoFramer to host excel, word documents in my wpf application.
I have the OnSaveCompleted event hookedup but the problem is it DOES not get fired for excel spreadsheets(all versions) but it does work for Word documents tho.
Is there something that I am missing?
Thanks!
Matt
...
<DataTemplate x:Key="tmpGrdProducts">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
...
I am creating a custom text box control to have some default formatting and validation functionality, including a custom validation property which accepts an Action or custom function.
In my current situation I can't use the Attribute validation framework that some people have posted, since I don't quite have access to modify the data m...
I have a two listboxes where I generate content from XML. I define UriSource in XML. I'd like to find out how I can update Frame's Source property from two different lisboxes. Any ideas are highly appreciated.
XAML:
Listboxes and Frame:
<Grid x:Name="PANEL_BottomArea_Grid" DataContext="{Binding Source={StaticResource PagesData}}">
...
Hi folks,
As some of you have discovered, a new feature (?) appeared WPF 4, where the data binding engine may pass your custom control instances of the class MS.Internal.NamedObject with the name "{DisconnectedItem}" into the DataContext - instead of the data item your code is expecting (this happens when a templated control is disconne...
I need some assistance in getting WPF KeyBindings working when being called from a WinForm application. I've created what I think is the basic parts to demonstrate the problem. I can provide an sample application if that helps.
The WinForm application starts a form which has a button that calls the WPF
Private Sub Button1_Click(ByVal ...
I am trying to format a ToolTip in a ComboBox. The following XAML is correctly picking up the value needed for the ToolTip, but not the DataTemplate.
<DataTemplate DataType = "ToolTip">
<TextBlock Width = "200" TextWrapping = "Wrap" Text = "{Binding}" />
</DataTemplate>
<Style x:Key = "RadComboBoxStyle1" Targ...
What would be the best way to get button parameters when my button is in an array
class myButtonproprties
{
int x;
int y;
}
where i use it as:
myButtonproprties array[][];
I am new to WPF and I have heard about the dependency property mechanism and didn't understand it
would it be helpful here?
EDIT:
let's say i am alre...
I have two expanders, side by side. I want only one to be expanded at a time. So if one is expanded, and the user expands the other, I want the first one to collapse. The user can have both collapsed, and both collapsed is the starting state.
As can be seen in the code, I have included the "Header" property as a test, and it works as...