« first day (640 days earlier)      last day (3509 days later) » 
07:00 - 20:0020:00 - 00:00

7:24 AM
0
Q: Modifying Install options by User when installing msi

yshoooooInstallShield LE provides us the option to either update the previous version(this keeping data) or remove the previous version completely and then install the new version. What I want is I want the user to choose whether they want to upgrade or completely install the new version. I am using Inst...

 
7:40 AM
good morning
 
Morning.
 
 
2 hours later…
9:57 AM
Morns
 
10:39 AM
I have a little problem...
I've done the INPC on a combobox in which I set the ItemsSource with the following binding
ItemsSource="{Binding Path=PropertyList, UpdateSourceTrigger=PropertyChanged}"
PropertyList is correctly updated, but values into the combobox are not
I continue to see the values that are set by default in the constructor
What am I missing?
 
11:15 AM
Did you raise the event of property changed in your collection ?
 
11:39 AM
gutten tog. or something.
Damn. Network isn't resolving XKCD. Can someone link it? I need dis.
:O
well that's slightly nsfw.
Hover text is "Don't turn it on."
 
@AndréSilva yes, in this way
`private CollectionView _PropertyList;
public CollectionView PropertyList
{
get { return _PropertyList; }
set
{
_PropertyList = value;
NotifyPropertyChanged("PropertyList");
}
}`
code does not format...
 
11:58 AM
@Maverik Suddenly that image shows. Can you nuke it please? <3
 
@FrancescoDS, do the objects in the collection have Equality properly implemented? that is usually the issue I have when I get your symptoms.
 
I haven't implemented Equals and HashCode, if you mean it dread
Is it needed?
 
try doing that. I assume the property you are displaying is the one used for equality.
 
you mean in _PropertyList = value row?
 
It seems it shouldn't be needed and that the default address comparison should match selecteditem to itemssource records, but I have found that it doesn't always work
 
12:08 PM
hi
 
I am not overly familiar with CollectionView, my ComboBoxes are usually bound to ObservableCollection<type>, so I don't know if it holds true in your case. Just sharing my past experiences with your symptoms
 
anybody has an idea about the usercontrol with ribbons?
 
thands dread
I am going to try it...
if anybody has another way to solve it...I'm here :)
@DreadPiratePeter I'm sorry...I've implemented Equals and HashCode
I've implemented the override of == and != operator
But it compares all than the property that I use for the DisplayMemberPath
does it mean something useful?
 
hmm, let me look at something for you
 
12:25 PM
ok Dread
 
from the documentation for CollectionView:
You should not create objects of this class in your code. To create a collection view for a collection that only implements IEnumerable, create a CollectionViewSource object, add your collection to the Source property, and get the collection view from the View property.
 
hi
 
Morning
 
1 message moved to recycle bin
Elo
 
12:31 PM
Thanks Mav. Morning.
I just put in a tool that generates reports on how many files are lost. 561. How the hell did my app lose 561 files? (In my defense that's about 1%)
 
@Maverik ...
question
 
heh morning
and shoot
how do you lose even one 1 file bill?
 
how does one implement a VM and M... does the VM create the M, orrrr ?
 
?!
 
a "higher level" create the VM
and pass the M in the constructor
of the VM
 
12:36 PM
well I tend to inherit from M to add the VM bits on top generally - avoid duplication
you've asked me this before btw ;)
 
well this treeview is makiing me go insane
 
in the rare instances that I'm using something like a ReactiveObject as base, then I'll either pass it in constructor or I'll rely on some injector
 
lets say you have a Phonebook application
you parse all the names into List<Person> People { get;set; }
sooooo, wheres the VM?
 
Class containing People will be a VM
Person will be the model
if you really wanted to be pure, you'd use List<PersonVM> instead
 
so now you want the user to be able to open a "contact card" aka click on a Person
okay, so then PersonVM would be used when a contact is clicked on
 
12:40 PM
well depends on how you want to do it, you could go with PersonVM + Command per person or you could have one PeopleCommand and pass the clicked person as param
 
and lets say you wanted to add a new person
do you create a new PersonVM and pass a Person through its constructor?
or pass the string info (name, address, phone number) to PersonVM and let the VM create a Person
 
hmm I could do both depending on whats easier
I think easiest in this case would be wrapper PersonVM
 
okay... because i'm following the rather "pure" form in a way, ObservableCollection<PersonVM>
 
you don't pass anything - instead your default PersonVM constructor creates and internal empty person
and then you use property initializer that actually writes to Person at backend
I dunno about purity much - i dont like it, so I'm the wrong person to ask from
I follow the concept as long as it makes my life easier
 
okay. what about parsing a person... would you create a PersonVM for each person parsed, or a Person?
you don't have to answer that :)
i gotcha
 
12:49 PM
@Maverik Been digging into it. There was a bug when users reordered folders in a specific, stupid way. I fixed the bug last month. No files since then have gone missing. So, this is still fallout from that bug.
I thought I had cleaned up, but my users are innovative in their stupidity.
 
@DreadPiratePeter so it is better to use ObservableCollection I suppose
 
@NETscape if you need to deal with things like change notification or something UI related, you have to create the vm
You thought you made your program foolproof? You can't fight the universe's ability to create better fools :)
 
No
God no.
 
right... but i've ran into the complexity of hierarchies and collections of collections and what not... its annoying hah
 
The bug is solved, but I thought I knew how they were causing the bug, and I tracked down broken files that way.
Turns out they were doing SEVERAL stupid things.
 
12:53 PM
Guys, have you read my question above?I need to know your opinion about...
 
@FrancescoDS have you tried calling PropertyList.Refresh()?
 
I hope it is not needed to call a refresh...
 
I don't really know the context, so i don't know what you're trying to do.
 
NETscape I've tried to describe it above...if it is not clear just ask
Or can I link my above message here in some way?
 
hover over the message and you get a drop down on left side
click that drop down, and right click permantlink and copy link -> paste here
but i'll give you the short answer, why aren't you already using ObservableCollection?
also Dreads answer is pretty clear in itself (without knowing the actual context)
just google away
 
1:02 PM
Because I've seen an answer in SO that uses CollectionView instead of ObservableCollection
 
well then use it?
they're not mutually exclusive
that makes no sense
CollectionView is coming from xaml side
ObservableCollection is from the VM side - they're not mutually exclusive
you should read on both and then make up your mind
 
and how is PropertyList "updated"
 
Ok I understand about the ObservableCollection usage
 
1:27 PM
even if you want to do the CollectionView route, you should be making a CollectionViewSource not a CollectionView, but I would recommend ObservableCollection, unless you specifically need specialized sorting and grouping
 
no I don't need...so...let's use ObservableCollection!
 
2:14 PM
And how about the fact that if I change only one property of the object observed, it does not change in the view? Could it be about the fact that it is not implemented INPC for that property?
 
2:32 PM
yes, if the property isn't reporting changes, you can't expect the ui to know about them
 
perfect!
 
 
2 hours later…
4:22 PM
posted on July 21, 2014 by ericlippert

Continuing with my series of answers to questions that were asked during my webcast last week… Do the “checkers” (algorithms that find specific defect patterns) find defects in unit testing code? If you want them to, yes. First off, as … Continue reading →

 
4:48 PM
;p;z
 
5:39 PM
How do I get a StackPanel to fill the remaining space horizontally?
 
you can't with just a stack panel
you can put it in a grid though
 
I'm trying to, but it isn't exactly working:
    <Page.Resources>
        <DataTemplate x:Key="GroupTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.Column="1" Margin="12,0,0,0" HorizontalAlignment="Stretch">
                    <TextBlock Text="{Binding Title}" Style="{ThemeResource ListViewItemTextBlockStyle}" HorizontalAlignment="Stretch"/>
                    <TextBlock Text="{Binding Artist}" Style="{ThemeResource ListViewItemContentTextBlockStyle}" HorizontalAlignment="Stretch"/>
 
kill the column definition
grid will auto expandt o fill by default
i think. hehe
 
Now they no longer appear in a list
instead they're all side by side.
3 boxes and then line break and then 3 boxes on next line
anyone else?
no one
sigh
 
5:54 PM
you can use a dockpanel
 
Why are you using StackPanel?
 
dock everything left, except the last. don't put an explicit dock on that one and it will fill the space
 
Just use the grid that already exists - give everything a row and column
and it'll "just work"
 
I barely understand the "give everything a row and column" part but ok
 
(provided the column/row you want to fill is star sized)
I'd recommend reading up on WPF Layouts - you'll struggle and be frustrated until you understand the basics of them
 
5:57 PM
@DemCodeLines provide a simple text picture of what you are trying to achieve. ie:
label1
label2
or label1 label2
 
former
 
and you want them all to fill horizontally?
 
dump the grid completely then
 
what
 
5:59 PM
<StackPanel Orientation="Vertical">
    <TextBlock HorizontalAlignment="Stretch"/>
    <TextBlock HorizontalAlignment="Stretch"/>
</StackPanel>
not grid
 
That doesn't work either, I tried it already.
@ReedCopsey You mean something like this?
<Page.Resources>
    <DataTemplate x:Key="GroupTemplate">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding Title}" Style="{ThemeResource ListViewItemTextBlockStyle}"/>
            <TextBlock Grid.Column="1" Grid.Row="2" Text="{Binding Artist}" Style="{ThemeResource ListViewItemContentTextBlockStyle}"/>
 
row and column start at 0, not 1
 
<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <TextBlock Grid.Row="0" />
    <TextBlock Grid.Row="1" />
</Grid>
That'll do what you want
The 2nd row will fill the vertical space then (provided you wanted that)
 
No, because there are multiple items.
 
@Maverik you around?
 
6:06 PM
But they aren't showing in a list.
 
yesh
 
whats your github?
looking for that selecteditem treeview you implemented... making a repro instead of trying to explain myself
 
Venomed
mm is this urgent? its 7pm here (i can stay if this is)
 
Here is how it currently looks
It's supposed to be in a list, not next to each other like that.
 
no Mav, you can check it out tomorrow :)
 
6:13 PM
so why aren't you using List DemCodes?
I think you're looking for ItemsControl with a custom DataTemplate
 
Because I need to be able to select multiple items and when using a list, it puts a checkbox next to each item, which looks ugly.
 
O.o
 
ahh you don't have the treeview project up anymore
 
I need to have the selected animation that grid uses
 
yea netscape i remove samples after the question is done
i'd have dozens of pointless samples otherwise ;)
 
6:14 PM
not pointless if they were used to teach :p
did you just intercept selecteditemchanged?
 
well yea may be - but you know how many samples i do!
 
or did you use IsSelected?
 
IsSelected
i stay away from events as much as I can
 
were you updating a SelectedItem though as users clicked on treeviewitems?
 
Is overriding events really that necessary?
 
6:17 PM
maybe in custom controls
 
sigh
 
depends what you're trying to do
 
It's just a selectable item list
each item can be selected when the user clicks/taps on it
 
multiselect?
 
Yes.
 
6:19 PM
Netscape i was using backend notification to set SelectedItem
aka hooked into INPC and offering SelectedItem like that
 
xaml is really starting to tick me off
 
only because you're not a ninja yet ;)
 
are you talking Ctrl + Click for multiselect, or you just want to be able to click?
 
just click
it's a WP app.
 
then each item needs to be something like a togglebutton or something
 
6:22 PM
we want 1 item per line?
 
Yes.
 
lol too many experts now
 
and you want each item to be selectable
 
I'm gonna let you guys go with this!
 
i started but then had to afk. lol
 
6:23 PM
have a good night mav
 
I am trying to replicate the following
Control-wise
 
ItemsControl
with DataTemplate
 
thats what i said!
i pass! :)
 
always listen to Mav
 
no not always
 
6:24 PM
that doesn't allow multiselect
 
its just a Collection Of Collections Of Collections
 
ahhh
 
Well, I want multiselect for this app
 
OC<Albums> where Album: OC<SongGroups> where SongGroup: OC<Songs>
and that'll get you what you want
 
your itemtemplate would be a togglebutton
 
6:26 PM
I currently have a GridView
 
why in the world would you want a grid view with that simple layout O.o
 
use a gridview if you need labelled columns with built in sorting
 
Alright, I am deleting everything I had and starting over.
All I have a is a Grid in there.
 
lololol
 
Does that need to go away too?
 
6:27 PM
no
 
if you want multi select, a ListBox might be better then ItemsControl
 
<ItemsControl ItemsSource="{Binding Items}" />
 
ItemsControl has no selection built in
 
I don't know about that Julien, only way to multi select is using a modifier key I think?
 
you can set selection mode on a listbox
single, extended, multiple
 
6:29 PM
Well, multiselect is number 1 priority.
 
right, but extended or multiple... you need to use Shift + Click or Ctrl + Click
 
extended you need a key
multiple you dont
 
Guys, guys, this is a Windows Phone app. There is no Shift or Ctrl button.
 
so you are working in silverlight
 
clearly windows phone sucks! :P
 
6:30 PM
ahh i thought on multiple you needed one... then yeah, listbox if julien is right
 
a lot of the stuff is similar buti ts not the same
 
As I said earlier, multiselect on listbox puts a freaking checkbox next to each item, which looks ugly.
 
nah i think hes in WP8
 
WP8.1
 
same thing :p
 
6:31 PM
ive used multi on listbox with no checkboxes
 
@Maverik :( hooked into INPC?
 
is that a wp8.1 thing
 
For multiple select, all I want is the animation that grid items show
Alright, let's try this again
Deletes, inserts listbox
 
@NETscape its an event so you just subscribe to it and look for property change of IsSelected and from there you know what changed -- set your SelectedItem on main VM accordingly
weakevents ftw of course
yea Julien i think its the default template
since its a template, there's no reason you can't change it
 
i want to make a wp8.1 app
is that a "Store App" ?
 
6:32 PM
I'd attempt it if wasn't 7:30 already >.<
 
Yes.
 
i am starting one
 
ok i'm definitely off for now
 
later mav
 
I added listbox, now what?
 
6:33 PM
Netscape leave me a ping if you want me to build you a sample tomorrow
 
there is no option for selectionmode
 
give it ItemsSource
i am trying it
i have a selection mode
 
No offense to anyone who likes it, but listbox selection looks ugly
 
App1.Windows (Windows 8.1)
 
you can make listbox look however you want.
 
6:36 PM
if the listbox doesnt look how you want, you'll have to pull out the entire ListBox template and modify it your liking
 
Dark Studio FTW / For Champions!
 
Look at item 5
 
yes yes.. i'm going -- closing stuff
 
That's all I am asking for.
Is it too much Microsoft?
 
well my listbox gives 1 item per line
and no checkboxes
so clearly we are doing something very different
 
6:40 PM
Mine isn't giving checkboxes either, that's ok but the only effect that I need is the one in the image above (Look at "Item 5")
 
its selected and checked
so you are asking about the background color?
my demo app highlights it with same color
 
Sure, I guess the checked part is the one I need
 
How is it possible to the compiled asp code return an error saying that it can't find a resource, but if you try to find it in the code you can F12 to it ?
 
7:02 PM
@ReedCopsey I got a repro of what I'm trying to do, want to check it out :) same goes for anyone else
 
what is it?
eww - marker interfaces
 
why is it so ew?
 
i did that for dependency injection.
because there will be different kinds of hardware, devices, maybe not necessarily folders.
 
empty interfaces are typically a red flag
 
but click the button a few times, then click on Device, when device is clicked, I would show a DataGrid with the Parameter info, and the parameters can be changed and what not
i know, i agree, they are just filler right now
i just haven't added anything to them yet, but they will all have something in common
so I'm looking for what actually needs a VM and what doesn't
 
7:08 PM
if you're just setting properties, and they manage themselves,
probably not much
 
i will typically be added items to the treeview after a file is parsed and what not
 
So listbox items do not support checked?
 
what do you mean checked? Items is a collection
Maybe you want hasitems?
 
i think you're expecting too much from xaml lol.
just because someone (Windows) has a control that looks like that doesn't mean WP has a control like that built in
 
Look at Item 5
 
7:11 PM
you need to use datatemplates
 
that looks like an itemtemplate
 
@NETscape That was an example. And actually, in that example, there was no checkbox stuff.
 
right, because it might just be drawing a Path when IsSelected = true...
 
This is getting pathetic.
@Netscape there's clearly a miscommunication between me and you
 
example, as in a project you downloaded and ran yourself? a image off google images? what is example?
 
7:14 PM
it's an iPhone application.
 
the point is you control what is shown, it doesn't work out of the box like that. you have to tell it to show up differently if you want it to show up differently
 
So there is no control on WP like that, yes or no?
 
not out of the box. and its not hard to accomplish that either.
 
@DemCodeLines That looks like a listbox with itemspanel wrappanel and an itemtemplate with text and path. A bunch of wpf controls.
post the xaml in a gist?
 
this whole time i thought he was showing how his app was appearing
not what he wanted. ol
 
7:18 PM
@DemCodeLines wpf is a bit painful in the beginning but nice when you learn it
I'm in the car right now so can't write a sample for you
 
there is no wrap panel in 8.1
 
there is a WrapGrid though. hehe
 
the same control?
 
dunno, trying it
 
7:21 PM
@JohanLarsson here is what I have:
and it looks like this:
 
@ReedCopsey I guess my question is, I have a Device model, and I'm pretty sure I need a VM for my Parameter, but it seems like it would be broken MVVM if my Device model has a list of view models.
 
yeah
you'd pretty much need to make a DeviceViewModel in that case
 
"The Panel you are using for the Control is not allowed as an ItemsPanel for the Control."
boo
 
@DemCodeLines The grouptemplate is the thing controlling how each element renders, are you using version control?
 
Okay, thats good news.
 
7:24 PM
@JohanLarsson The problem is that it's displaying all elements on the same line.
It needs to be in a list, like a stackpanel, except in a way where each element fills the width horizontally.
No version control.
 
@DemCodeLines Google itemspaneltemplate, set it to stackpanel orientation vertical
@DemCodeLines Start now
If you use git you can play around like a wild man and just revert back to where it worked.
Exteremly useful when playing with samples ime
 
@JohanLarsson the problem with stackpanel is that the width of the panel only goes up to fill the content, which is usually half the screen in my case.
 
easy to do in non-wp8.1, not sure what control to use inside ItemsPanelTemplate
 
@ReedCopsey
1. Create Device
2. Pass to a new DeviceViewModel
3. Parse file to get list of Parameter
4. Foreach Parameter, call DeviceViewModel.AddParameter(Parameter) which creates and wraps a Parameter in ParameterViewModel.  Also, Device.Parameters.Add(Parameter)
 
what is a "Parameter" in this case?
 
7:29 PM
a type
when i parse a file, it'll be a bunch of Parameter.
I need to be able to show the list of Parameter in a DataGrid. and I can change the values of the parameter's, which might end up changing other parameter values.
 
You know you chose the wrong platform to develop on when you ask a question that leaves even the experts confused
 
Pretend your Phone is a device. When you change a Setting on your Phone it might effect other Settings. If you did an image backup of your phone, I would think that it would persist something like a Phone object and its list of Settings
 
that was for @ReedCopsey, sorry.
 
I know, I am just saying in general for myself
 
7:36 PM
i'll see if i can do something quick in WPF
 
@DemCodeLines I think you want to use msdn.microsoft.com/library/…
problem is @DemCodeLines isn't using WPF - so we're answering questions he's not asking :)
 
Well, I am using XAML and WPF controls (I think).
This is what stackpanel looks like
See how some stuff gets cut off?
it's ticking me off
 
a stackpanel will expand to fit content. you have something blocking it
 
That's the code for it
@ReedCopsey LongListSelectors aren't supported in WP8.1
 
@DemCodeLines I have never done any phone stuff btw.
 
7:43 PM
From that link: Windows Phone OS
Supported in: 8.1, 8.0
 
@JohanLarsson I'd assume the language would still be the same.
 
definitely supported in WP8.1 ;)
@DemCodeLines Get rid of the Grid surroundin gthe StackPanel
 
@ReedCopsey It isn't. That's a Microsoft article. You have to think twice when you read it, sadly.
 
there is a WrapPanel in the WindowsPhone Toolkit, but guess what, not supported by 8.1
fun times
 
Or make your second column: <ColumnDefinition Width="*"/>
@DemCodeLines That is a microsoft reference - it's a link from msdn.microsoft.com/library/windows/apps/…
that is from the phone API directly
 
7:47 PM
Visual Studio refuses to recognize long list selectors
 
Do you have Microsoft.Phone.dll referenced?
 
add it
 
07:00 - 20:0020:00 - 00:00

« first day (640 days earlier)      last day (3509 days later) »