Friends With:
Friends By:
Kick Spy:
wisemx submitted Microsoft Download Center beta:
(7 hours, 18 minutes ago):
wisemx submitted July 2008 MSDN mag on-line:
(3 days, 2 hours ago):
wisemx shouted something:
(3 days, 9 hours ago):
wisemx shouted something:
(3 days, 11 hours ago):
wisemx submitted IIS7 GAC Viewer:
(3 days, 11 hours ago):
wisemx shouted something:
(3 days, 21 hours ago):
wisemx submitted Microsoft Usability study:
(3 days, 21 hours ago):
wisemx shouted something:
(5 days, 6 hours ago):
wisemx shouted something:
(6 days, 10 hours ago):
wisemx shouted something:
(9 days, 2 hours ago):
wisemx shouted something:
(14 days, 3 hours ago):
wisemx shouted something:
(21 days, 20 hours ago):
|
Shoutbox
Jemm said
(23 days, 11 hours ago):
Great:) DNK has been in need of your quality posts :)
wisemx said
(23 days, 12 hours ago):
I did run away from all the spam but was drawn back by the sense of Community. Rotten 1%ers spoil it for the nice guys. ;-)
Jemm said
(23 days, 16 hours ago):
W00t! You are back:)
wisemx said
(4 months, 10 days ago):
Give this question a break until we get the updates during or just after Mix 08 ;-)
yesthatmcgurk said
(4 months, 10 days ago):
One more question...
Have you ever heard of embedding binary resources as string within XAML? I'd love to be able to have an image on a XAML document and have it serialized to a string resource inside the .xaml text. Managing resources in a separate file will be an issue for me in the future...
yesthatmcgurk said
(4 months, 10 days ago):
Thanks. I read over the article; it did give me some hints. I managed to get my xaml template -> XPS document code working. Get this... For each DataRow FixedPage xaml with layout and controls is loaded into a MemoryStream and fed to the XamlReader. Data is bound to this template. Template is configured for the page's resolution and size and its layout is updated. A PageContent is created and the FixedPage template is set as its child The PageContent is added to a FixedDocument. When all data rows have been merged, an XpsDocumentWriter is created and the fixed document's DocumentPaginator is Write()'d.
Result: Xaml template + data -> XPS document.
Sweet.
wisemx said
(4 months, 14 days ago):
yesthatmcgurk said
(4 months, 14 days ago):
K, I'm busy too. First question:
Coming from the windows forms/aspnet world, patterns for newing up forms and accessing controls aren't the same with XAML and WPF. (everything I'm doing is currently in 2005) Lets say I have a DLL project. I add a new FlowDocument (WPF) to the project. This creates FlowDocument1.XAML. I open this up and see markup similar to an aspnet page. Great. I add a Paragraph and a TextBlock with Name="Lol" to the FlowDocument node in the XAML editor. I add the attribute Name="MyFlowDocument" to the root FlowDocument node. The XAML document does not have a codebehind file, nor does it have inline code.
Now, what I want to do is "new" up the object described by this XAML document: FlowDocument fd = new MyFlowDocument() and I want to access the TextBlock: fd.Lol.Text = "Hai from WPF!"
This, of course, does not work. How do I manipulate XAML documents like this in code? Bonus question: how could I do this generically--for any WPF document (FrameworkElement?), if it has a TextBlock with a name of "Lol", set the text to equal the above? TIA.
wisemx said
(4 months, 14 days ago):
I like the idea of hashing it here, makes it public and I'm all for community. Sorry it took me a day to get back, was away.
yesthatmcgurk said
(4 months, 14 days ago):
Hai, thanks for the offer to help. So, this xaml thing... I have a number of questions that I'm having a hard time wrapping my head around, but the shoutbox here is kinda small. What do you think?
|