Print Page | Close Window

Invalidating and Rendering parts

Printed From: Codejock Forums
Category: General
Forum Name: XAML Snippets
Forum Description: Post your XAML snippets here for everyone to enjoy :)
URL: http://forum.codejock.com/forum_posts.asp?TID=12879
Printed Date: 18 May 2024 at 1:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Invalidating and Rendering parts
Posted By: BobWansink
Subject: Invalidating and Rendering parts
Date Posted: 10 December 2008 at 5:38am
Hi all,

is it possible to invalidate and/or Render() parts of an already rendered XAML object? Say i have a messagebox with a progressbar in it. I want to be able to update only de width of the progressfilling of the progressbar without having to reRender() the whole panel.

Why would I object to this? Because the messagebox shows the output of our algorithm. Redoing Render() delays our system.

Thanks!

Bob


-------------
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++



Replies:
Posted By: Oleg
Date Posted: 10 December 2008 at 3:22pm

Hi,

how do you show progress ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: BobWansink
Date Posted: 11 December 2008 at 3:18am
I'm using a Rectangle (contentOfProgress) within a Rectangle (borderOfProgress).

contentOfProgress uses a setter to set its width.

Right now, i use an xaml file to Parse() the progressbar. I've added some code that fills in the width dynamically into the setter, then resubmits the entire XAML for parsing. This is sloppy though, since most of the waitwindow remains the same, only the progressbar is resized...

Is it possible to get the CXTPMarkupObject representing the Setter and dynamically edit the width with something like:

CXTPMarkupObject * pObj = xaml->getMarkupObject(x);
pObj->SetWidth(int w);

where 'x' is some sort of identifier and 'xaml' the root markupUIElement?

Bob


-------------
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++


Posted By: Oleg
Date Posted: 11 December 2008 at 7:20am
Hi,
 
Yes. Add Name property for your Rectangle, now use FindName method to find it and SetWidth to set width.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: BobWansink
Date Posted: 11 December 2008 at 9:33am
Thanks Oleg!

-------------
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net