|
Hmm never heard of this before. Have you used it? What concerns me is two things: 1. You can't use an attribute in the middle of a code block for stuff like writing to console only during debug and 2. VS will automatically hide a section of code depending on what's defined for the current configuration. Does this work with the attribute as well?
Logifusion[^]
|
|
|
|
|
Dustin Metzgar wrote: 1. You can't use an attribute in the middle of a code block for stuff like writing to console only during debug
That's the whole point. The attribute allows you to remove debug-only (or whatever-only) code from your "real" code. Since I started using it, I almost never use preprocessor directives anymore because it is just so much cleaner to factor the test/debug code out.
Dustin Metzgar wrote: 2. VS will automatically hide a section of code depending on what's defined for the current configuration. Does this work with the attribute as well?
No, but if you put all of your Conditional methods in one #region, or in a partial class extension, you'll have the same effect.
Josh
|
|
|
|
|
I have a project that I'm trying to finish and I need help writing the volume 3.1416(r2xhx3.1416) can some one help.
thanks
wanda
|
|
|
|
|
School assignment?
What specifically is it that you need help with?
---
b { font-weight: normal; }
|
|
|
|
|
I am doing an application which is using remote invocation, with Invokemethod. When I invoke a method from a remote class, it gives me the exception TargetInvocationException. how can I find out what exception threw the remote class? I mention that I step into the code for the remote class, but there is no exception thrown when step through the method invoked. Also, I tried searching Google , CodeProject and MSDN, but with no success whatsoever.
Can anyone help me please?
|
|
|
|
|
ok. that was stupid for me. Just check the InnerException method. But now I have another problem encountered. When I do an InvokeMethod on a method which returns string[], everything's OK. But, when I InvokeMethod the same method, only this time returning Type[] (for example) , it gives me a TargetInvocationException. Can pls someone point me to some place where I can read all I need in order to understand about these kind of issues?
|
|
|
|
|
kreaThor wrote: Can pls someone point me to some place where I can read all I need in order to understand about these kind of issues?
That silver bullet does not exist. Welcome to the jungle.
josh
|
|
|
|
|
hi to all
I want to create my own popup menu in InternetExplorer
can anyone help me
|
|
|
|
|
|
What is the best way to read values from other Third Party Applications (textboxes, combo boxes) using .Net? Any Ideas? Can you point me in the right direction?
Thanks in advance
Mike Lasseter
|
|
|
|
|
Hi EveryOne,
In VC.net programming I placed a TxtBox On the Form.
IN this TxtBox I entered Something and when i press 'Enter' From KeyBoard Some Function May be Called.But I didN't find any Function In the properties of TxtBox Methods.
I find for TAB ie txt_leave,but Not For Enter.
If any Method Directly Exists Kindly
send me
|
|
|
|
|
|
Hello
I have a VC application (EXE) and i want to convert it to a Web Application
how can it be done in Dot net?
regards
Shailesh
|
|
|
|
|
If this app your talking about is a Windows Forms app, then you'll have to rewrite it from scratch. There is no conversion utility to convert any Windows Forms app to a Web Forms app. The two models work so vastly different that it's impossible to do.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
What does Serialize and MarshalByRef do ? What is the functionality ?
|
|
|
|
|
|
Here's my scenario:
I have a piece of UI that accepts that takes a value (happens to be a property on a custom object) in an edit control. When the user commits the change, the form controls are disabled and the value is applied to an underlying object, which takes a couple of seconds. When the underlying object completes the assignment of the value it fires an event indicating that the change is complete. When the event is received, the UI is enabled and the user can proceed. Should be a piece of cake.
Note: Perhaps the user experience could be designed a little better, but that is a separate issue, for now it is what it is.
After spending a couple of weeks messing around with XAML, I can't see how this can be done in XAML by a non-coding (UI person), it seems like I have to implement handlers in code behind or start building my own custom controls.
Explanation:
1) The event object is not of type Routed Event.
2) If the event was of type RoutedEventArgs, I would have to lose information that is passed in the existing event.
3) The underlying object is not a UIElement, so it can't raise that event anyway, have to subclass and create a new custom control.
4) If I implement a data binding object to catch the custom event, I have no way to "catch" the custom event or even the standard PropertyChanged notification in a useful way in XAML.
5) If I try to implement a trigger on the PropertyChange notification, I can only do so in style that cannot operate on child or parent objects (thus the form can't use a trigger and setter on propeties of the textbox)
6) Event triggers can only operate on Routed Events defined for the object in question - custom control again
7) Event triggers can only operate on the control raising the event.
8) Event triggers call handlers which are implemented in code (behind or inline).
9) yada, yada, yada
In summary, my form cannot respond to events or property changes in child objects, only the controls themselves can.
Additionally, controls only respond to predefined events, requiring sub-classing for additonal events/properties.
Finally the only events at my disposal are of type Routed Events so a limited amount of information can be provided.
Granted, today I do not have any kind of Markup language for my UI folks to use that can readily transfer to Visual Studio, but even with XAML, a programmer is still required to implement the code behind and wire the layout together. The idea that UI folks can develop applications in XAML while coders just work on DataSources and Validation objects seems to be a myth, or at least a Nirvana that NET 3.0 doesn't acheive.
Am I missing something. Seems like I am learning a whole new language and shifting to a new development paradigm just so I can import UI layout from a designer tool.
|
|
|
|
|
I feel your pain. I, too, am torturing myself with the hazy and poorly documented world of WPF.
IMO, the behavior you described (disabling the UI until a custom event fires) sounds like something that should not be in the XAML. From my experience with WPF so far, it seems that a layout and appearance settings should live in XAML, but any specialized behavior should be in the code-behind. Francois, the turtlenecked artiste, should not have to see the implementational details of how an app behaves.
That's just my opinion, though.
Josh
|
|
|
|
|
Agreed, I don't want Francois the artiste to know anything about my application, but it would be nice if Alex the useability/design guy were able to do build out working prototypes to show to customers.
I guess I bought into the myth that non-coders would be able to do app. development, but it doesn't seem the case unless they're doing real fluffy stuff that doesn't interact with any of our code. Unfortunately my boss bought into that myth too.
I think there is a lot to like about WPF, its just XAML that I'm having trouble with. XAML does suggest an ability to react to property changes and events, and that you should be able to write an application with it, it just doesn't really cut it for rich-client development IMHO. I'm sure that people at insurance companies writing input screens that just collect data and drop it in a DB will be quite happy with it, especially with the binding and validation hooks.
|
|
|
|
|
nicknotyet wrote: I'm sure that people at insurance companies writing input screens that just collect data and drop it in a DB will be quite happy with it, especially with the binding and validation hooks.
Having worked at an insurance company, I can tell you it's not that easy. Their applications are just as demanding as anyone else's.
Logifusion[^]
|
|
|
|
|
Yes, that was kind of a gross generalization, sorry about that.
You got the idea though.
|
|
|
|
|
My take on the XAML/code split is a little different than yours. What I filtered out of the MS advertising mumbo-jumbo is that application devs and graphic designers can work separately, most of the time. Instead of having a GD come up with a visual theme/layout for the app and then say to the dev, "Make it look like this.", the dev can give the GD a layout and say "Make this look good."
I never picked up a notion of MS saying "With XAML, anyone can create enterprise apps!" That's been tried, always with the same obvious outcome. To me, their message (to the business world) has been "With XAML, you won't depend on your aesthetically challenged developers to make things look good."
Maybe we've been reading different MS ads, though...
Cheers,
Josh
|
|
|
|
|
Like I said, I bought into a myth (or rather, it was imposed upon me). Your take is consistent with the product, so I believe you and confirms my impression of XAML.
|
|
|
|
|
If you have the time (yeah right), you might want to do an article search on CP for MyXAML. It's something Marc Clifton is involved with very heavily. It's similar to Microsoft's idea, just from a different approach.
Logifusion[^]
|
|
|
|
|
Is the Grid-tag just good to define the layout/alignment of controls, or can be used as a true grid control?
Does it allow scrolling with a fixed header? Can I navigate through the cells with the arrow keys?
If I want an array of 20x20 edit boxes, do I have to define each edit box or can I use the ColumnDefinition/RowDefinition to get a column/row of controls?
Does the grid itself has any events to notify the parent that cell x,y has changed, is not beeing edit etc.?
Links with information about the grid would be great too.
Thanks Andre
|
|
|
|