0 down vote favorite
I am trying to create a validation rule for a given control (in this scenario, it is the TextBox).
I am not able to obtain a successful Binding to the property of an object, although appropriate steps were taken: ValidationRule and DepedencyProper ty are taken advantage of.
Kindly find code below. A side note is that "Is Required" in the custom Validation class is...
User Profile
Collapse
-
WPF DependencyProperty Validation Binding fails
-
I received a tip on this issue.
Code:CommandParameter="{Binding Path=DataContext.Attribute.Path,RelativeSource={RelativeSource AncestorType=ContentPresenter, Mode=FindAncestor,AncestorLevel=2"/>
-
[WPF] Data Binding Hierarchy Issue
Hello everybody,
I am new to WPF, and trying to develop a small application using DataBinding following the MVVM paradigm.
I am trying to provide a binding functionality to the ObservableColle ction of Documents (my type). The First Label would display a Documents path (available through Attribute property), while the next children - Pages of the Documents - would display appropriate information: page index and page content... -
I think I found my problem...
Code:internal virtual void Initialize(List<GUIComponent> childrenComponenets) { if (childrenComponenets.Count > 0) { foreach (var guiComponent in childrenComponenets) { Initialize(guiComponent.ChildrenComponents); guiComponent.Initialize(Color);
Leave a comment:
-
Multi-Inheritance, Recursion and Stack Overflow Exception
https://gist.github.com/23048a7c3cc7c7768d8c and https://gist.github.com/4621acc4d76d611e8d55
cause a Stack-overflow exception here: https://gist.github.com/23048a7c3cc7...gui_componenet. However, if i keep to the old design, everything is ok: https://gist.github.com/be821a529e8440f73831
any help, please? -
Then, I'd need to hard-code the name "settings.x ml" in my program (to associate it). Anyways, thanks a lotLeave a comment:
-
so, if the resx file , in a way, is hard-coded at compile-time, i can use regular hard-coded values in my classes...?Leave a comment:
-
i was trying to do something like that. instead of reading the resx file at runtime, the resx file at design/compile time would define the settings.xml file, in return, at run-time, the settings.xml file would then point to the respective content....does it make sense?Leave a comment:
-
Thanks for the link. i`ll look into it.
Nope, not at program run time. At design time.
Treat it as a class with some properties that would act as dest. folders. I don't know what kind of behaviour resx files exhibit at run-time.Leave a comment:
-
Is there a button for quote-tag? :) lol
anyways,
could you please give more details on this, if you don't mind?
What I think I'm going to do is- Create a resource manager (.resx file)
- Create a string element in it with a given folder name, e.g. string1 = "texture", string2 ="ship" and so on
- When I would need to reference a destination folder from where my asset manager should load .xml files and other thingies,
Leave a comment:
-
-
EARNEST started a topic How to assign a folder that should be referenced for any files needed C#,XNAin C SharpHow to assign a folder that should be referenced for any files needed C#,XNA
Hello there,
I've got a bit of a problem. XNA allows to use XML files, however, it will serialize them into XNB, so the only chance I can edit them is at design-time, not run-time. That is why, I decided to use a normal .NET serialization/deserialization . However, how do I set a folder for all my textures, audio and other files?
As an example of what I want is:
Code://pseudo code entity.Deserialize("/textures/ship/ship.xml");
-
Yes, XNA specific. And about content loading and pipe-lining, yes, the XNA's serializer works a bit differently as far as i know. Also, it is only present in the full .NET 4, not the Client version (or whatever it's called). Also, you're write on this
And about user's editing my xml files. but, as you said here and earlier, if they mess up something, it's their fault. and, the XML solution is a temp one, i'd like to find something more...Leave a comment:
-
Ok...weird thing, now I don't know if i should use XNA's IntermediateSer ializer or "standard" one.
Here is the code:
Code:class AssetManagement { public void Create() { GameEntity2 testValue = new GameEntity2(); XmlWriterSettings xmlWriterSettings = new XmlWriterSettings(); xmlWriterSettings.Indent = true; using
Leave a comment:
-
thanks again. i think, i could achieve the same results without inheritance, but only by just using Location class and different way of serialization. Good example, thanks a lot, but I think it is an overhead to extend serializer, unless i'm missing somethingLeave a comment:
-
-
EARNEST started a topic How to change the way the Vector2 is presented in a file upon serialization?in C SharpHow to change the way the Vector2 is presented in a file upon serialization?
Hello,
Current output result when I serialize my asset's class in XNA is of the following form:
Code:<?xml version="1.0" encoding="utf-8"?> <XnaContent xmlns:Game_Entities="HPC_AsteroidGame.Game_Entities"> <Asset Type="Game_Entities:GameEntity"> <ListOfSprites /> <Center>0 0</Center> <Position>0 0</Position>
-
and why won't you do something like this
Code:GameShip ship = Content.Load<GameShip>("ship.xml");
Leave a comment:
-
thanks for your informative answer. the code you provided is something that I am planning to do. also, i was wondering about these large commercial game dev teams and the way they solve this issue. i've never seen an xml file with level/world description, do they use some customized data structure and serialization or what?
I am not sure if I understood you, so, please, correct me if i'm wrong. i will have a "scanner"; let's say...Leave a comment:
No activity results to display
Show More
Leave a comment: