« first day (766 days earlier)      last day (3383 days later) » 

5:33 AM
0
Q: Work with WPF controls at the server side of ASP.NET MVC

IdsaAs part of my Quartz.net job I need to load some data to WPF control and make a screenshot of it. Is there any safe way to initialize System.Windows.Application inside ASP.NET MVC application (so that I could work with WPF controls)? Should I reinitialize System.Windows.Application every time ASP...

 
 
2 hours later…
7:28 AM
@Maverik thanks for the invitations to the recycle bin room... don't really know how I should take that....
 
8:04 AM
0
Q: Make a columheader in a Listview (GridView) collapse dynamically

DabblernlI want to present data in a ListView using a GridView. Depending on the amount of data that is shown I want to make the columheaders collapse or to be visible. I tried to acomplish this thus: <Style TargetType="{x:Type GridViewColumnHeader}"> <Setter Property="Focusable" Value="False"/>...

 
9:04 AM
@Markus have you thought about doing a bus tour when in Paris ? Also my gf said you have to see Le Louvre and les Champs Elysees (even though I think champ elysees are overrated, at that time there will be the xmas market & other xmas decorations so that might be nice...)
 
We are planning on going to Le Louvre, and Champs Elysees are just a street right? not a shopping mall or something? then we will probably walk on it
 
an avenue
quite long..
 
yep I've been in paris before (and walked the champs). even ate there, probably overopriced
(not the full length probably)
 
the best way is to go from place de l'étoile and walk east from there to the center of paris
 
9:10 AM
I'll have it in mind
 
i mean following the champs elysees
 
mm
 
***
 
I also think that we shall walk the Rue Tournefort. been there before
 
9:15 AM
Ohh and an other question. Getting from the airport (de gaulles)
bus or train or taxi? what would you prefer?
 
train, RER B
taxi is expensive
 
rer b is that the line or something?
 
yes
 
what's train in france?
 
train is train
:S
 
9:18 AM
sweet!
 
not the same pronunciations though
 
I'll learn my french from google translate translate.google.se/?source=osdd#auto/fr/train
 
:)
I like memrise.com to learn a language
 
9:58 AM
Morning guys
 
good morning Sean
 
Morning franssu, how's it going?
 
fine and you ?
 
Not bad thanks
 
10:40 AM
Morns all
 
Morning André, how're you?
 
Sleepy
 
Same
 
And sweating a lot
Because of damn summer
 
It's winter, what are you talking about? #ignorance #therestoftheworldisnotathing #screwthesouthernhemisphere
 
10:48 AM
I was trying to understand what There Stof The World is Notathing
 
Have you completed that task successfully?
Or should I expand?
 
Yeah yeah I understood
I'm still waking up
Even though I'm get out of the bed at 6h30am
 
#thisIsWhyWeUseCamelCase
 
I always share love of Camel Case
 
I always share my love of camels
 
10:50 AM
And please, don't talk about Pascal Case :( I hate that
 
They're beautifully sadistic animals
 
They have a great aim
 
Pascal Case? You mean Camel Case with the first letter also capitalised?
Yeah they do#
 
Exactly
 
I like pascal case
Not for locals
 
10:51 AM
We could string strMyThing or we could String StrMyThing
@franssu Edit that, please :(
 
@franssu Yeah man, screw that noise
Hahahahahaha
Me and André get told off, now NOBODY IS ALLOWED TO SWEAR
 
I need to learn how to swear in a more polite way
 
@AndréSilva Ah but String is special. You can't Int IntMyThing
 
Well you can, since int === Int32
 
@franssu My good sire, wouldst thou kindly go forth and replicate with short, sharp, jerky movements?
@AndréSilva Exactly my point
The less obvious form of "eff off"
I dislike camel case for function definitions, most of all
JS: function ohLookASmallO C#: void OhLookABigO
Left is ugly
Right is bootiful
 
10:57 AM
But Camel Case is not the same for all kind of calling
 
That makes it even more confusing
 
Camel Case doesn't tell you to use a underscore at the start of the variable name if it is a internal definition
 
Neither does Pascal Case
 
Exactly, that is a formal way of understanding
 
That's a convention brought over from C and C++
 
10:58 AM
And it works perfectly
But you wouldn't public void MyThing() { String MyVar = String.Empty; }
 
No of course not
 
That is ugly and looks like amateur code :X
 
Are there formal definitions for where you should use these things?
Because Camel Case (AFAIK) says you can use either
 
I don't think so haha
 
I don't think Pascal Case says you have to use first-letter capitals everywhere
Gah
It all depends on the language, too
 
11:00 AM
Pascal and Came Casing are just like Little Red Riding Hood
 
Little Red
 
Damn google tricked me
Everyone knows the story
No one can remember watching any movie when they were young about it
 
I'm making you a better person André
 
I appreciate :D
 
I'm engraining the idea that being wrong is an unacceptable thing and you always have to be right
You're gonna grow up to be a grade A douchebag
I'll be so proud ^_^
 
11:02 AM
Haha
I already am a big douchebag in real life
 
Nawwwww don't say that
 
Today on the bus, I went to a lady that was talking on the phone, told her to turn off the phone because her voice was annoying
I am too honest
 
André the Awesome. André the Unbelievable. André the Great. André the Unstoppable. André the Kind. These are all names I have heard to describe you. Notice how "André the Douchebag" is not in there
Hahahahahahaha
 
Haha thanks for the compliment
 
@Sean "Formal" is just a matter of which conventions you're adopting. Microsoft publish a set of guidelines on MSDN: msdn.microsoft.com/en-us/library/ms229002%28v=vs.110%29.aspx
 
11:04 AM
OK I'll give you that one
 
I really hate the sun when I'm working
 
Pascal Casing just means writing PhrasesLikeThis. It doesn't specify where to use it, just like saying writing in ALL-CAPS is a way to write words, not a convention on when to use it.
 
Yeah I realise that was a silly thing to say
Casing is casing
Naming is naming
 
Who did I point to that exact page the other day, I can't remember hahaha
Oh it might have been me. I was wanting the convention for private constants. R# just told me to go Pascal Case so I did
 
11:07 AM
Yeah, R#'s out-of-the-box behavior defines a de-facto standard. :)
 
All caps is nasty though
Which makes me sad because I know I've used it
Consistency? Thick.
 
I've worked in a lot of projects which use all-caps for all constants, a convention carried from C/C++.
 
Yeah I used that because I had seen it used a lot
 
Also for Enum values, being sorta constants too.
 
Dude, go read some code from Interop, Microsoft put a lot of BAD_NAMING_FOR_VARIABLES
 
11:09 AM
Oh no I always use pascal for enum values
And then I went looking for the conventions because I realise that I don't really follow any
 
@AndréSilva That's the convention for Win32 code, so it makes sense that Interop code uses it.
And, for some of the finest projects, a mix of ALL_CAPS and PascalCase for enum values. FUN!
 
Really? It still is ugly
 
Hahahahaha
Also you know what I didn't know until not long ago? No? Well I'm about to tell you.
 
Tell me !
 
Thick in the US is used to describe a woman with more meat on her bones
 
11:10 AM
@AndréSilva Yup. And often uses Hungarian notation, too.
 
Random ad popped up one day "Find thick women in your area!" I was like "What the hell? Why would I want to meet stupid women?!"
 
@AvnerShahar-Kashtan What is a Hungarian Notation?
 
Cos I said thick
 
I knew that
I still want to know what the difference of Thick and Chubby is
 
Unimportant
 
11:13 AM
@AndréSilva An old coding convention that encodes the variable's type as part of its name.
 
Awwwww yeeeeah I used to do that in WebForms for controls
 
Like string strThing ?
 
txtUsername
lblUsername
It's nasty, don't do it
 
I do that
 
LOL
 
11:14 AM
Those are so-called Apps Hungarian Notation, signfying the logical type.
Systems Hungarian Notation is worse.
szName is a null-terminated string.
 
I do that because I learned VB.NET and C# using Notepad++
 
Oh that's what sz means
 
I spent 2 years in school learning with Notepad++
 
pAccount is a pointer. lBalance is a long. lpBalance is a pointer to a long.
 
Hahahaha, same
 
11:15 AM
I use lngVar for Long
 
I recognise some of them
So what's LPTSTR?
I forget all the C++ string types
 
Long Pointer Turd String? :X
 
Hahahahaha
 
I have no idea what that T is doing there
 
turtlehead!
 
11:16 AM
Long-pointer to a TCHAR based string.
 
You've got WCHAr and TCHAR and all sorts...
Oh that makes sense
I basically just answered my own question
 
I have no idea what those are
 
42
Q: LPCSTR, LPCTSTR and LPTSTR

nothingMasterWhat the difference between LPCSTR, LPCTSTR and LPTSTR? Why do we need to do this to convert a string into a LV / _ITEM structure variable pszText: LV_DISPINFO dispinfo; dispinfo.item.pszText = LPTSTR((LPCTSTR)string);

 
Wide character
And something else
 
Remember that this is in languages and frameworks THAT DON'T KNOW WHAT STRINGS ARE.
 
11:17 AM
I think WCHAR was for one of the unicodes
 
i.e. the Dark Ages.
 
I think the advisory is to use TCHAR, I think... I think TCHAR handles both fixed-length double-width characters and TCHAR handles variable width? I read that Joel thing about everything you need to know about Unicode and have never used it since so the grey matter has probably lost something
 
Haha there is a reason why I like to be young
 
WCHAR is a Unicode "wide" char. TCHAR is an alias to WCHAR if the current library is compiled to be Unicode-enabled, and an alias to char (meaning byte in C# parlance) if not.
 
Did not have to work with enigmatic languages
 
11:18 AM
That's it!
Close enough haha
 
I am so glad to be past those days.
Well, at least in C#-land, which is where I like to live.
 
11:34 AM
I think I'm melting
 
 
4 hours later…
3:12 PM
Hi
I need help with Databinding of DP property
Anyone can help ?
 
3:43 PM
if you ask the question, then maybe someone can help.
 
Where do the (params) come from in an ICommand. I am trying to call a command, from another command and I need to pass the parameters along
 
<Button Command="{Binding YourCommand}" ComamndParameter="{Binding SomeElement_property_or_something}" />
 
Right, but im in code right now
 
and ?
aaahhh... you mean - you writing it in code not in XAML ?
 
The command is bound and it is called, but then I want to pass along the args to another command function
I think ill do it a different way....
What is wrong with the binding of your dependency property?
 
3:48 PM
Asheh ?
Aaa.. my question
I'm binding DP from another custom control to CLR property in my ViewModel
everytime I update my local CLR property the DP does not pull the new data :(
 
Got some code?
Are you doing the usuals? Inheriting INotifyPropertyChanged, Binding=TwoWay and OnPropertyUpdate("myProperty")
 
@Jasper NotifyPropertyChanged
 
asheh... it's tooo much code :(
 
Have you correctly implemented INotifyPropertyChanged?
 
Like I said ^
 
3:52 PM
I just made it shorter :P
 
;)
 
anyone've been dealing with XpsDocument?
 
Moses Apriso: yes - in base of the base of ViewModel NotifyPropertyChanges working
 
public int Prop
{
    get { return _field; }
    set { _field = value; NotifyPropertyChanged("Prop"); }
}
@Jasper Like that?
 
Something similar
yes
 
3:57 PM
Idk exactly what caused the data binding doesn't pull the right data beside you wrongly used INotifyPropertyChanged
 
@Jasper: If you're binding a property in a customcontrol I guess you'll have to set the relativesource in your binding to FindAncestor
 
Binding=TwoWay ?
Ah yes, any binding errors in output?
 
Binding=TwoWay -> yes
 
@Asheh the default is TwoWay. It doesn't need to be explicitly stated
 
Binding errors -> no
FindAncestor -> yes
 
3:58 PM
can you show your xaml-binding
?
 
Tomtom: I'm still don't understand why I need to do this RelativeSource :(
 
@Jasper 99.99% sure you doesn't implement INPC correctly
Generally there's 2 things that caused a binding to behave incorrectly
1. There's something to do with the binding
2. INPC incorrectly implemented
 
Moses: I actually bind another ListBox control to exactly same CLR property to see if it actually changes - and yes - I have a new results everytime. ListBox binding to this CLR peoperty does working
but DP from another control to the same property only work once
on very begging :( I guess from static ctor
@Tomtom - why does my DataContext changed to UserControl datacontext inside binding ? Why UserControl does not inherit the Window DataContext ?
I'm changinf to ObservableCollection<> - may be it because of 'CollectionChanged' event
Set to 'null' and then set to collection - does not help :( DP still does not pull the new data :(
 
so lets say , we bind together the rotation property of a set of views ,lets say wheels
and then bind that to a local static resource
how do I change that local static resource on runtime
is storyline the only way of animating ?
 
@GeorgeMinatsis Trigger ?
Trigger in Style ?
 
4:08 PM
trigger ? new intel, msdn time again,
i really don't believe i can write a decent game in blend and xalm without writing a single line of code
how realistic does that seem by your standards
 
@GeorgeMinatsis - no you not
 
@Jasper: I've just created a small demo-application with a usercontrol which has a string-DP which is displayed in the UserControl in a Label. In the Window (where I host the UserControl) I've made a Textbox and bound it to a property where the DP of the usercontrol is also bound to.
 
I mean - simple 'kick of the wall' is possible
 
with the following code it's not working:
`<local:MyUserControl HorizontalAlignment="Left" Height="100" Margin="132,98,0,0" VerticalAlignment="Top" Width="100"
SomeProperty="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<TextBox HorizontalAlignment="Left" Height="23" Margin="66,242,0,0" TextWrapping="Wrap"
Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" Width="120"/>`
if I change the binding of my usercontrol to:
<local:MyUserControl HorizontalAlignment="Left" Height="100" Margin="132,98,0,0" VerticalAlignment="Top" Width="100"
SomeProperty="{Binding DataContext.Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,
RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}"/>
if works fine
 
@Tomtom - yes I know - but why ? why does DataContext is changing ?
Why you must use RelativeSource
 
4:13 PM
I don't know exactly. But I guess, that your UserControl has it own DataContext and so you're living in there.
 
And here it is - try to add a Button and inside a code change the DataContext.Value
does DP updated ?
please define DP as I did:
DependencyProperty.Register("Property1",
typeof(ObservableCollection<SecurityRole>),
typeof(RolesSelectionTreeViewDropDownConrol),
new FrameworkPropertyMetadata(new ObservableCollection<SecurityRole>(),
FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
SelectedRolesChanged)
, (param) => {
System.Diagnostics.Trace.WriteLine("Param is: " + param);
return true;
My 'SelectedRolesChanged' function does not called when I change DataContext.Value (as in your case) property :(
@Tomtom - did you chec that ?
In your case it does working ?
 
4:42 PM
@MosesAprico just curious, what's your project about ? A tab viewer ?
@Jasper how do you change DataContext.Value ?
 
4:59 PM
@franssu an application to write down a musical notation. why?
 
I play jazz a little
is it a new notation ?
 
that's a numbered musical notation. origin in china, also called by jianpu
in indonesia, numbered notation is commonly used alongside the standard one
 
is it good ?
I guess it's as good as any other system
 
5:15 PM
idk exactly since i don't play music myself. but, after I learned a bit for this application purposes, it doesn't represent a complex music as good as the standard one.
it doesn't have, for example, a crescendo notation.
 
I thought it was a personnal project
 
well, it's a so-so
it's my university final project
for graduation prerequisite.
 
I see
 
i pick this topic myself, or, to be more exact, i stumbled upon this project HAHAHA
 
what do you mean ?
 
5:22 PM
I mean, I accidentally pick this project (I didn't know it is that hard, otherwise I won't pick it)
maybe complicated is a more appropriate word instead of hard
 
eheh
good thing you picked up a simple technology like WPF
 
Simple stuff is simple in wpf no?
 
which only requires a PHD to bind a boolean to a checkbox
 
binding is not that hard, well worth learning. Best feature of wpf imo.
 
I'm kidding
 
5:27 PM
Actually it has nothing to do with WPF, it's musical notation which is the culprit
 
btw, anyone of you ever build a windows 8 app?
 
nope sorry
I'm going home, bye!
 
my lecturer told me to make the mobile version (reader only) as well
bye frans
 
Yes, several
What is your question about it?
Note that Windows 8 apps and Windows 8 Phone apps are slightly different
 
5:36 PM
0
Q: Method linked with Subscribe in EventAggregator pattern is never fired

VishalI have two ViewModels called ViewModelOne and ViewModelTwo. I also have a class called SelectedTileChangedEvent in my Infrastructure Project. Here is the code: public class SelectedTileChangedEvent : CompositePresentationEvent<int> { } In ViewModelOne: _eventAggregator.GetEvent<SelectedTileC...

 
5:47 PM
@BradleyDotNET yes, I see it has different project if I make an universal app
 
Yeah, I haven't run through all the universal app stuff yet
But I am familiar with Win8 development in general.
 
So, I want to make an app which has 2 column, the first column consists of a listview which contain a list of paths
and the second column is the xps viewer
i wanna know how to use the xps reader inside the app
i can use it with DocumentViewer in desktop WPF app, but there's no DocumentViewer in Win 8 app haha
Or at least, I wanna throw the selected path in the list view to be opened in the reader app (externally)
 
Got nothing for you there
If you provided a way to open the file; maybe
But I'm not sure if you even can do that.
 
So, in a simple way, a win 8 app doesn't support in app xps viewer
if that so, then
how to use reader (externally) from my app?
I mean, I have a list of file name (which is only consists of xps files), if I click an item, then, it's opened in reader
(reader i meant is a pdf / xps reader app called "reader" which is installed by default in win 8)
 
6:03 PM
Perhaps something like this: stackoverflow.com/questions/12457368/…
 
well that's nice. thanks
 
6:23 PM
Morning WPF dudes. Throwing expections is expensive. However, I'm also told that there is no point to see if a value exists in a database to then add a value to a database - anything could happen between after I check and then add! So they say just add it. However, doesn't this throw an exception?
Isn't this against the point? Or am I being too literal?
 
@Dave You can't always avoid exceptions
So I think you are being a bit literal
The idea is, avoid exceptions when you can
And don't throw your own when necessary
But some cases (like the one you mentioned) are impossible to avoid (without a table-lock, which is a bad idea)
They aren't that expensive
 
Sorry for slow reply.
I understand, thank you so much for the advice
:)
 
you also have the option of an "INSERT ON DUPLICATE KEY UPDATE" style
that will avoid exceptions
 
Let me google that
 
you can also do INSERT INTO stuff WHERE NOT EXISTS
 
6:39 PM
that, seems much more intersting
wow.... hmmmmm.
 
6:49 PM
@Julien, do you have any idea what is wrong with my query?
INSERT INTO @TableName (EmailAddress, FirstName, LastName, Gender, IsSubscribed) VALUES (@EmailAddress, @FirstName, @LastName, @Gender, @IsSubscribed) WHERE NOT EXISTS (select null from @TableName as temp where temp.EmailAddress = @EmailAddress)
Or any one else
 
well whats the error
 
yes, that woud help :(
nope
no error now
well, that was easy!
frustrating, but easy!
erm.... Sorry!
Can I use paramaters (@) for just parameters? In the code I gave, I'm using it for the table name as well
No error, but, the database does not update either
Can I assume this is a coding fault?
and I should write select into " + table + "
 
probably only works for values
but im just guessing
 
 
2 hours later…
9:15 PM
Reed, are you around?
 
yeah - what's up?
 
If you have time: clone it, click it, flame it :)
@BradleyDotNET official nag (again :)
 
any reason you put the spinners into the class directly and not as an adorner?
 
lack of skill is the only reason.
How is an adorner better?
 
9:28 PM
less overhead when unneeded
 
I don't like the spinners much at all, kept them for legacy.
 
and simplifies the API
 
ok, pushing on the todo. ty sir.
this feels like a hack.
Could not figure out a clean way to edit th text so it woud be undoable.
Less ugly than using clipboard and paste though.
 
you could always keep the undo stack in terms of values instead of text, which would likely be more accurate anyways
but you'd need some form of undo frmaeowrk built in
 
I aimed to keep things as standard as possible.
Standard validation with binding etc.
Huge hack to make it work ~realtime~
Debated if template part is cleaner than having to do this
 
9:49 PM
template part is more standard
 
Ok, perhaps I'll refactor. Don't like template parts much. Feels leaky.
@BradleyDotNET did you find dumbs?
 
dumbs?
 
in the controls:
- ux
- wpf-x
- code, english
(if you have time)
 
10:07 PM
I don't at the moment; you might consider posting portions of the code on CodeReview SE to get more eyes on it (check their rules/help center of course).
 
ok, np I'll just add it to production :)
better than what we have now at least
 
 
1 hour later…
11:09 PM
posted on November 24, 2014 by Immo Landwerth [MSFT]

This is a cross post from the .NET Foundation blog and written by Gianugo Rabellino. --Immo The increased openness of .NET has sparked widespread interest in the .NET Foundation. As a result, its Board of Directors has decided to extend the timeframe for community feedback on the .NET Foundation Advisory Council to December, 5, 2014. The Advisory Council will bring unique knowledge

 

« first day (766 days earlier)      last day (3383 days later) »