Click here to Skip to main content
15,886,821 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: The name "employeeviewmodel" does not exist in the namespace "clr-namespace:testwpfvbapplication.viewmodel". C:\users\abdul.aleem\desktop\testwpfapplication\testwpfvbapplication\view\mainwindow.xaml Pin
Richard Deeming26-May-16 10:55
mveRichard Deeming26-May-16 10:55 
GeneralRe: The name "employeeviewmodel" does not exist in the namespace "clr-namespace:testwpfvbapplication.viewmodel". Pin
indian14326-May-16 12:17
indian14326-May-16 12:17 
QuestionRequest Entity Too Large Pin
Mycroft Holmes25-May-16 21:57
professionalMycroft Holmes25-May-16 21:57 
AnswerRe: Request Entity Too Large Pin
Gerry Schmitz26-May-16 7:45
mveGerry Schmitz26-May-16 7:45 
GeneralRe: Request Entity Too Large Pin
Mycroft Holmes26-May-16 14:28
professionalMycroft Holmes26-May-16 14:28 
GeneralRe: Request Entity Too Large Pin
Mycroft Holmes26-May-16 17:58
professionalMycroft Holmes26-May-16 17:58 
QuestionHow to bind a nested Property of an attached Property Pin
Member 808505724-May-16 4:47
Member 808505724-May-16 4:47 
QuestionWPF Binding Question Pin
#realJSOP24-May-16 4:12
mve#realJSOP24-May-16 4:12 
I've written a "typical" WPF application that utilizes data binding and displays a number of "slides". To view these slides, the user selects one from a ListBox.

One of the requirements is to save the selected slide as both a JPG and Power Point slide. This works great.

The other method for saving the slides allows the user to save all of the slides with the click of a single button (without selecting one first). The idea is to create the slide in memory, and save it. The problem is that any bound elements on the slide do not get included in the saved image.

This is the code I use to "render" the card in memory:
C#
// create the slide (this sets the datacontext)
CtrlMySlide slide = new CtrlMySlide();
slide.Visibility = System.Windows.Visibility.Visible;

Dispatcher.Invoke(new Action(() => 
{ 
    // this method loads the viewmodel used in the bindings, and 
    // is also called to called to actually display the slide when 
    // selected from the liistbox
    slide.RenderCard(this.FiscalPeriod, item, true);
    // I thought calling these methods would cause the slide to 
    // render itself in memory, but evidently, it's not enough
    slide.Measure(new Size(1024d,768d));
    slide.Arrange(new Rect(0,0,1024,768));
    slide.UpdateLayout();
}), DispatcherPriority.ApplicationIdle, null);
// this method actually saves the slide to the desired file 
// formats
slide.Save(result, true);

EDIT ===================

I also tried creating a modal window and rendering the slides to that window. Same result.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013


modified 24-May-16 10:39am.

AnswerRe: WPF Binding Question Pin
#realJSOP24-May-16 5:02
mve#realJSOP24-May-16 5:02 
QuestionBinding the x,y location on a Canvas with a ItemsControl Pin
Kenneth Haugland19-May-16 17:38
mvaKenneth Haugland19-May-16 17:38 
AnswerRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Kenneth Haugland19-May-16 19:28
mvaKenneth Haugland19-May-16 19:28 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Meshack Musundi23-May-16 2:54
professionalMeshack Musundi23-May-16 2:54 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Kenneth Haugland23-May-16 11:26
mvaKenneth Haugland23-May-16 11:26 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Pete O'Hanlon25-May-16 0:56
mvePete O'Hanlon25-May-16 0:56 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Meshack Musundi25-May-16 1:27
professionalMeshack Musundi25-May-16 1:27 
QuestionRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Kenneth Haugland7-Jun-16 20:22
mvaKenneth Haugland7-Jun-16 20:22 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Meshack Musundi8-Jun-16 10:27
professionalMeshack Musundi8-Jun-16 10:27 
GeneralRe: Binding the x,y location on a Canvas with a ItemsControl Pin
Kenneth Haugland8-Jun-16 10:41
mvaKenneth Haugland8-Jun-16 10:41 
QuestionGet Datagrid Selected cell value in ViewModel Pin
indian14315-May-16 12:48
indian14315-May-16 12:48 
AnswerRe: Get Datagrid Selected cell value in ViewModel Pin
Pete O'Hanlon15-May-16 23:26
mvePete O'Hanlon15-May-16 23:26 
QuestionAdding Resources is giving errors not letting me add Resources Pin
indian14315-May-16 2:48
indian14315-May-16 2:48 
AnswerRe: Adding Resources is giving errors not letting me add Resources Pin
Richard Deeming16-May-16 1:21
mveRichard Deeming16-May-16 1:21 
GeneralRe: Adding Resources is giving errors not letting me add Resources Pin
indian14316-May-16 6:25
indian14316-May-16 6:25 
GeneralRe: Adding Resources is giving errors not letting me add Resources Pin
Richard Deeming16-May-16 6:28
mveRichard Deeming16-May-16 6:28 
GeneralRe: Adding Resources is giving errors not letting me add Resources Pin
indian14316-May-16 6:36
indian14316-May-16 6:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.