last day (4150 days later) » 
08:00 - 14:0014:00 - 17:00

8:39 AM
i would love if this room gets active
:) i am new to wpf and have a lot to learn
 
9:13 AM
hi there ^^
well i'm a wpf enthusiast
I wish a happy future to this room
 
9:36 AM
There we go!
 
hi there ^^
 
I is haer to larn !
 
rofl :D
Hell yeah !
 
yes thats properly mutilated now
 
good job indeed
 
9:38 AM
oh i do like the avatar btw.. didn't know about the hand-made bit
 
yeah I've had it for 2 years now, and still love it
 
hmm i can't do a side by side thing in here can I?
 
how can I tag the room btw ?
side by side ?
u mean regarding the different rooms ?
 
yea like i could have both wpf / c# rooms
i'm wasting the wide screen right now
 
lol
actually i dont think it's possible
 
9:42 AM
anythings possible :)
 
huhu
 
if it ain't there - build it! XD
 
use two tabs
and resize them
:P
 
nah there used to be an extension for chrome that allowed you to drop tabs in a tab
never figured the purpose of that - but now i see it!
 
lemme know if you get it to work
 
9:53 AM
I did find something else interesting: Clover2 -> Chrome style tabs for Explorer
 
welcome here ^^
@Maverik i'll check taht
@Markus is your _showTab a property or field ?
 
Prop: public bool _showTab {get; set;}
 
ok
weird name for a property :P
 
:)
and this was the bindning:
visibility="{Binding _showTab, Converter={StaticResource BoolToVisibility}}"
 
Microsoft guidelines concerning .NEt are first letter caps for properties ^^
ok
and the binding is not working ?
both ways ?
 
10:05 AM
at first it was a private field...
 
i see ^^
ok well
 
well I don't care about updates of the value, it's just a binding to hide a tab depending on what program is running my dll
 
when you have binding issues, first thing is to check your output window in VS
did you see any binding error there ?
 
mm and I don't get anything!
not a zip
 
in that case, consider using a OneTime binding
binding are costy
 
10:06 AM
what is a OneTime binding?
 
it's a binding that do not refresh
it only get resolved once
 
mm that's what I'm trying to do :)
I set the _showTab just before the InitializeComponent()
and it's false by default anyway...
 
ho this is in a UserControl ?
 
but still my tab shows
 
hmmm
could you manage to make a small working example ?
 
10:08 AM
nae, it's in a window
here?
and of what?
 
juste your tab
with the binding
not working ^^
and you can create a question if you prefer
I'm still desperatly grinding rep :P
anyway, it can be multiple things
but if you can reprouce it with a very limite code, I can help you
there is actually nothing wrong with the code you have shown me this far
 
Ok, I'll make a small example.. the thing with creating a question is that there already exists so many, they just don't answer my question...
 
i'll answer
I check new WPF questions everyday ;)
but you can ask here if it's more convenient for you ;)
 
Ok, so I'll get back in a moment...
 
sure
 
10:17 AM
@Markus I've normally found that to be a bad idea. Controls tend to ignore stuff that happened before they were created
but yea looking forward to the example code
 
another mission complete : stackoverflow.com/questions/12949817/…
 
first of all, do I need to specify where the variable is located if it's located in the code (.cs) for the window as a public property?
like set some sort of dataContext or something
 
you need to have a dataContext set yes
what's the dataContext of your window ?
 
nothing
 
well
that's a problem
;D
 
10:31 AM
ok
 
the code that is creating your Window should associate a DataContext to it
 
hmm say what? :) shouldn't I set the DataContext in the XAML?
 
i usually don't do that
never
:D
dataContext should be initialized only once for each window of the application
inside the window, it should only be propagated through bbindings and data templates
how do you create the window ?
is it the main application window ?
 
it's not the main.. although in my example it will be...
 
so you have to do something like : var window = new yourWindow() in your code
 
10:38 AM
yes and then window.ShowDialog()
 
answered
well before the window.ShowDialog you'll have to do something like window.DataContext = your_viewModel
where your_viewModel is the object on chich you defined the visibility property
 
what is my mainwindow controller?
ok
 
try the code in my answer
I tried it and it works
to adapt it in your context
you just have to set a correct viewModel for your window ;)
 
in your answer you say and change your binding to ..., I can't see any difference with the way it already is?
 
mainwindow constructor sorry
it as a typo ^^
there was a typo in your binding
_loadUserGroups in palce of ShowTab
 
10:47 AM
ahaa that was changed a while back :) refresh :)
 
yeap
just edited my answer ;)
set the post as answer if it seems ok to you ;)
 
It's ok, just have to wait four more minutes for some reason :)
 
lol
ok
so
one thing to remeber from this
always check if your datacontext is correct when you have a binding issue
it's the first thing to check, really :)
 
mhmm I was kind of hoping that the variables from the code would in some magical way exist anyway...
 
taht would be very dark magic
:P
 
10:52 AM
hey a lot of things in wpf is very magic dark or brigth ;)
 
yeah that's right
that's what makes its beauty, and its horror at the same time :D
 
Anyway that's awsome! :) thanks
ehh btw what's the difference between having the ShowTab = false; before and after the Init?
 
@Markus in your case there's no difference but if you have change notification enabled you really want to do things after your controls have been created through InitializeComponent
I've had times when my changes weren't being picked up or even main window not being created when I tried to do stuff before initializecomponent
 
yw mate :)
 
its a frustrating thing to figure that your order of code execution is the reason for the bug and not the code itself!
 
10:59 AM
ok thanks
 
@Maverik : exactly, i also had bad times because of that
 
also another tip
in VS -> Options -> Debugging -> Output Window -> WPF Trace Settings
set everything to at least warning
be default it won't tell you about mismatch or missing bindings
if you had it on, it would have flashed a warning about missing binding
 
To me it just seem a little hard to know what happends first, I mean since it's not updatable anyway I thought it was important that the variable was set before the wpf was loaded
 
@Markus you're right - but you're in constructor of the window - nothing will really be created until you're done in constructor
what you want to do is - call the other constructors in the chain before you start to do stuff to your main constructor so the basic stuff is in place
 
ok, I thought that it started being created just after the init
 
11:02 AM
if that makes sense
 
in a new thread actually...
 
@Markus init actually comes after constructor
I normally hook stuff to Loaded event for things like hiding tab and stuff
 
but... how does it know that the constructor is complete?
 
you exit the ctor method? :)
 
@Maverik Loaded event can be tricky though
 
11:04 AM
true.. but its less tricky than an application that does nothing
 
if you hide the control then show it again, it will trigger a Loaded event
 
@Maverik if you fill this in to my q you will get a up...
 
not only after object constructor
 
and you're left scratching your head why isn't any error being thrown if something is wrong
 
OnInitialized is more suited if you dont need the control template expanded
Initialized event sorry
 
11:05 AM
@Sisyphe Yea that works too - I generally don't do heavy control initializations so I haven't had any problem
 
I've had much :D
 
@Markus thanks, I'll leave it in a comment
left comment on Sisyphe's answer
i'll be 1307 now :D
 
upped
 
cheers
 
;)
 
11:08 AM
but i'm on a tricky number now!
1337 - 1307 -> 20 points - so I need to get an accepted answer and one vote up ?
 
you'd like to be 1337 right ? :D
yea
 
XD
 
:D
 
Why did you go with WPF gurus instead of just WPF?
already existed?
 
no
just liked the name :D
do you think WPF would have been better ,
?
 
11:12 AM
I would have preferred it
WPF gurus kinda feels like its an experts only room
but that could just be me
 
it was more like a joke
well let's create it
gime a sec
 
can't change the name?
 
lemme see
room topic changed to WPF: A room for discussing anything related to WPF (no tags)
changed
 
!!!
notice the (no tags) bit?
 
room topic changed to WPF: A room for discussing anything related to WPF [c#] [vb.net] [wpf]
 
11:14 AM
try throwing tags into that line like [wpf]
XD
 
yeah just found them
do you want admin rights ?
 
nah
we're all adults here - we'd be lucky if other people actually talk here :)
so far its just you and I
 
yeah
 
reminds me of the song!
 
hey that's not true ! Markus was pretty talkative :D
and Samy seems very promising :D
 
11:16 AM
well I mean after people are done with real question :)
like our c# watercooler chat!
 
actually I'd really like this room to catch some WPF experts
 
btw I just installed Clover2
and its awesome!
its like one of those things that you don't know you needed until you found it!
Imagine Explorer with a bookmark (besides tabs)
and a sleek look is welcome too! :)
 
Clover2 is the extension you were talking about earlier ?
 
yea
BHO Extension to Explorer
its even working on Windows 8 and thats the amazing part
 
ok lemme check it
 
11:24 AM
Dropped in :P
 
12:02 PM
Here's a thing I never understood...
it seems like with different containers (grid, stackpanel, dockpanel, etc) have different influences on the content's size. in some the controls get's stretched and in other they don't. what is the pattern?
 
haha !
excellent question !
you're totally right, different panels have different behaviors regardind layouting their content
WPF acutally uses a two pass layout algorithm
mainly based on MeasureOverride and ArrangeOverride methods
these are virtual methods available on any UIElement
children of a panel are responsible for telling what size thez require
that's the measure pass
and panel are responsible for layouting their children and allocating spaces for them
that's the Arrange pass
 
pass? as in pass to window?
 
well
as in step
firt measure all childs
then arrange
anyway
the logic taht telles how a UIElement is rendered in a Panel
is in the ArrangeOverride method
this is where you decide what space to give to a child
WPF made some choices for the buit in panels
StackPanel does not stretch it's children by default
DockPanel does it for the last child
Grid depends on column/row definitions
 
is there any like guide to this? like a pamphlet or something? :)
 
well not really
not that i know of
but i'm starting a blog
 
12:10 PM
yea you just pick it up as you go :)
 
maybe that could make a good article :D
 
or somebody can start a blog :P
 
:D
 
@Sisyphe Is there anyone that does it for all it's controls?
 
didnt get what you mean ?
you want all your control stretched ?
tell me your exact funtional need ^^
 
12:43 PM
back.. yes I wan't to stretch all my (two) controls. I'm trying a grid right now
By the way, on the way I got in to a different (more important) question. First time starting any wpf it takes ages! is there anything to be done about this?
 
@Markus theres a service that WPF starts first time its run - thats whats taking ages
 
and, there's nothing to do about that?
 
well generally no
Windows Font Cache Service is the name
with more modern apps coming on WPF - it'll eventually be normal to have it running all the time
but if you're not lucky with that, then you have to suffer the cold boot of that service
 
geeee Font Cashe... I would understand it more if it was like .net framework service or something but....
 
(this is my guess - I haven't actually googled - mere observation from my own development)
its a windows service
you can see it in services.msc
brb
it could also be "Windows Presentation Foundation Font Cache 3.0.0.0"
depending on your framework
 
12:58 PM
well it seems as the windows font cashe service is just for windows 7 and this was a xp machine... ( blackviper.com/windows-services/windows-font-cache-service )
honestly I'm quite amazed that Microsoft doesn't include this in windows in some way... One could think that it's in there interest that c# apps starts in a reasonable time!
 
I've only had this with WPF apps - my console / form apps don't suffer from same startup time
 
hmm
strangely enough I don't have this kind of issues
WPF app load is instant
 
hmm
maybe you have some wpf app load at startup which does the stuff for you. and as you say it, I don't have the problem on my computer either. Although it's a lot faster than the users computer who had the problem
 
yup
 
1:15 PM
well we used to have it on our enterprise pcs - now we have a group policy that has the service on autostart and start up times are much better
 
1:31 PM
room topic changed to WPF: A room for discussing anything related to WPF [c#] [vb.net] [wpf] [xaml]
 
Actually now that I think about it - may be throw silverlight here too? considering they're so similar?
 
sure
godo idea
good
room topic changed to WPF: A room for discussing anything related to WPF [c#] [silverlight] [vb.net] [wpf] [xaml]
u sure you don't want admin rights ? you could do stuff like taht ;)
 
nah
i'd rather pass the suggestion and let you choose :)
 
ok
at least i tried :D
 
I just searched for a XAML room
 
1:34 PM
found one ?
 
aparently that doesn't exist - if you're going to throw sliverlight in there, then may be rename to XAML to cover all bases
 
rename the room you mean ?
searching for XAML returns this one
 
yea sounds logical
yea cos of tag
 
yeap
 
so even if it was named XAML (thus being agnostic) it would still come up for wpf
 
1:35 PM
yeap
but its actually not only xaml
it seems to restrictive as a room name
 
I guess it is hard to pin this down
 
well, actually WPF too
cause it's not only WPF
 
wanna throw mvvm into tag mix? :)
 
but it's not only xmal too...
hmmm
 
true but Xaml > wpf
 
1:36 PM
yeah sure !
not really :P
 
ok lets stick with wpf..
lets see if anybody would drop in through a search
 
room topic changed to WPF: A room for discussing anything related to WPF [c#] [mvvm] [silverlight] [vb.net] [wpf] [xaml]
you may be right
maybe XAML is better
 
hehe
 
1:58 PM
This scaling thing.... So If I place two ListViews in a ScrollView, then they resize to fill the scrollview. However if I add a StackPanel into the ScrollView (into which I locate my ListViews) then the ListViews get the smallest possible size (at least height)
can I get the StackPanel to fill the ScrollViewer as the two list did?
sorry! the two list are also located in a grid to separate them.
 
08:00 - 14:0014:00 - 17:00

  last day (4150 days later) »