Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Community
General Tabletop Discussion
*Geek Talk & Media
d20 die roll string parser and roller in C#
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Mustrum_Ridcully" data-source="post: 4156665" data-attributes="member: 710"><p>Yes, the debugging often seems to become a lot more difficult. If you're using Visual Studio 2008 and .NET 3.5, it's possible to get the .NET source code for debugging purposes online. (100% legal, but you won't be able to change it, off course.) I haven't tried it yet, since I am still stuck with 2005 and .NET 3.0.</p><p></p><p>How do you want to bind your ObservableCollection? One of the easiest way to do it is to expose the ObservableCollection as a (possibly dependency) property on your control. </p><p>You can now use a syntax like this</p><p></p><p>[CODE]</p><p>ItemsSource={Binding ElementName=ControlWithDesiredProperty, Path=ItemCollectionPropertyName}</p><p>[/CODE]</p><p></p><p>This would assume that you're naming your control in the XAML with x:Name=ControlWithDesiredProperty</p><p>(x being your "http://schemas.microsoft.com/winfx/2006/xaml" namespace.)</p><p></p><p></p><p>If you go deeper into templating, you will probably use TemplateBinding and RelativeSources in your bindings, and will do without using elementnames. Instead of using the ElementName, you can also set the DataContext to that element (if you have multiple bindings to the same element, this will probably clear up the code...)</p><p></p><p>What usually isn't enough is just setting the ItemsSource property to your desired collection (in code) if you expect the collection itself to be replaced often. (If you use change its contents, it will work fine).</p></blockquote><p></p>
[QUOTE="Mustrum_Ridcully, post: 4156665, member: 710"] Yes, the debugging often seems to become a lot more difficult. If you're using Visual Studio 2008 and .NET 3.5, it's possible to get the .NET source code for debugging purposes online. (100% legal, but you won't be able to change it, off course.) I haven't tried it yet, since I am still stuck with 2005 and .NET 3.0. How do you want to bind your ObservableCollection? One of the easiest way to do it is to expose the ObservableCollection as a (possibly dependency) property on your control. You can now use a syntax like this [CODE] ItemsSource={Binding ElementName=ControlWithDesiredProperty, Path=ItemCollectionPropertyName} [/CODE] This would assume that you're naming your control in the XAML with x:Name=ControlWithDesiredProperty (x being your "http://schemas.microsoft.com/winfx/2006/xaml" namespace.) If you go deeper into templating, you will probably use TemplateBinding and RelativeSources in your bindings, and will do without using elementnames. Instead of using the ElementName, you can also set the DataContext to that element (if you have multiple bindings to the same element, this will probably clear up the code...) What usually isn't enough is just setting the ItemsSource property to your desired collection (in code) if you expect the collection itself to be replaced often. (If you use change its contents, it will work fine). [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Geek Talk & Media
d20 die roll string parser and roller in C#
Top