« first day (648 days earlier)      last day (3501 days later) » 

00:02
btw - got rid of the extra tostring/etc
 
2 hours later…
02:25
0
Q: Conditional binding in a template using dependency properties

B.K.I have a button that has four dependency properties, each representing a state the button is in. Each state's source is an image. What I would like to achieve is an ability for any state other than NormalState to bind to NormalState's value if it's own value was not provided. I tried doing it ...

 
2 hours later…
03:58
posted on July 29, 2014 by ericlippert

Today another episode in my seldom-updated series about building a home aluminum foundry. The technique I use for casting aluminum is called “green sand” casting not because the sand is green (though the sand I use is in fact slightly … Continue reading →

 
4 hours later…
07:59
Hello, people.
How can I animate a DrawingVisual using DrawingContext?
            using (DrawingContext dc = _visual.RenderOpen())
            {
                dc.DrawLine(_pen, _startPoint, _endPoint);
            }
I want to spin the line around _startPoint.
Either I may apply sort of RotateTransform and animate its angle, or somehow animate _endPoint.
But I do not know how.
 
3 hours later…
11:12
Morns
@Denver Can't you use Storyboards?
11:25
Yep, I'm not feeling too good
11:45
Hey.
I guess, I can. But I do not know how.
I mean, how do I apply storyboard to a Point.
Or to a RotateTransform's angle parameter.
I think I did something with RotateTransform and storyboards once
Let me find it here
I let you find it.
I'm really feeling weird
I don't have it with me :( I think I deleted it
2
Q: WPF Rotate rectangle animation in XAML

viperboneHow can I rotate a rectangle forever defined in xaml. So far I only found a solution with code: http://www.codeproject.com/Articles/23257/Beginner-s-WPF-Animation-Tutorial which I use like this: private void Window_Loaded_1(object sender, RoutedEventArgs e) { var da = new DoubleA...

I think my blood presure is low... I hate when this happens
hello firends i am trying to implment drag and drop in mvvm..but the strange thing is happening with me,,,when i try to drag the it,e event doesnt' fires..but when i drag the items from outside it start working..i want the first case make it working whille dragging...is there any special way?
I am using behaviour and relay command for this
That item is a component? Because if I'm not mistaken the Drop event from WPF is related to files only. But I'm not sure
11:58
The shift lever on my bike broke today. I'm stuck in my down-hill gear. BOO
RotateTransform oTransform
    = (RotateTransform) lblHello.RenderTransform;
  oTransform.BeginAnimation( RotateTransform.AngleProperty,
    oLabelAngleAnimation );
Hm, this seems promising.
Thanks, André!
;) No prob
ok if you want to see th xaml i can post here also @AndréSilva
No need ;p The Drop event is a single attribute only
so whats the solution?
12:00
You want to trigger the drop command when you drag and drop some object from the view in it ?
yes exactly..for that i am not using triggres ..i am using drag behaviour
Not sure if this helps, but try it out
3
Q: WPF C# Drag and Drop

user2376998Basically i am doing a drag and drop using textbox and labels , by dragging a label to a textbox . Textboxes and Labels are created in same for loop . I have dynamically created textboxes ( textbox is the drop target) like this : TextBox tbox = new TextBox(); tbox.Width = 250; ...

I'm going to drink some water, I'm feeling very sick today
@AndréSilva not working
0
Q: drag drop not working.. want to trigger the DragOver command when you drag and drop some object from the view in it

Harjeet SinghDrag Drop not working...hello firends i am trying to implment drag and drop in mvvm..but the strange thing is happening with me,,,when i try to drag the item event doesnt' fires..but when i drag the items from outside it start working..i want the first case make it working whille dragging...is th...

12:29
morning folks
@AndréSilva I hope you start feeling better
@DreadPiratePeter do you have any idea regarding my above posted question?
12:44
Mornins Pirate
@DreadPiratePeter Thanks ;)
I took some meds and I'm feeling a bit better
Good to hear, Andre.
13:05
Hi guys
hihi franssu
lol
Animations work even in XAML-view.
It is unusual seeing dynamic control in XAML-view. xd
And so smooth.
I am getting hypnotized.
Well, time to go home, cyas.
13:20
++
my VMs and their Views are being resolved via DI. When I want to display a VM from another I have to expose :
public UIElement MyView { get { return myVM.View; } }
Any thoughts on that ? It feels wrong.
13:52
hi
yeah, that feels wrong to me too
I could use a converter to get the View from the VM
Morning NETscape.
14:13
@franssu does that mean every VM has 1 V
hey bill
14:41
yes @NETscape
so you're calling .Show() when you want to show them or?
lets say I have:
public class J : IFace
{
    public string A {get; set;}
    public string B {get; set;}
    // ... C - Y
    public string Z {get; set;}
}
where IFace has string A - D.
and I have
public class K
{
    public string One {get; set;}
    public string Two {get; set;}
    public string Three {get; set;}
    public string Four {get; set;}

    public K(string one, string two, string three, string four)
    {
        One = one;
        // .... and so on
    }
}
would it be better to do:

var k = new K(J.A, J.B, J.C, J.D);
or have a public K(IFace face);
and do face.A, face.B, etc.
or public K(J j)?
@franssu? @Maverik? :)
15:02
var k = new K(J.A, J.B, J.C, J.D);
K(IFace face); and public K(J j) are coupling K to IFace or J and therefore should be avoided
sorry
i've been trying to get a dead phone going
right.. how can i help :)
now sure how to pass info
more realistically
public class ProjectProperty
{
    public string Version { get; set; }
}
public class PrintPageViewModel
{
    public string Version { get; set; }
    public PrintPageViewModel(string version) { Version = version; }
}
so basically I'll have a section on a page that will show some ProjectProperty properties.
and I don't know whether or not I should just have a public ProjectProperty Properties { get;set;} in my PrintPageViewModel
@Maverik or if I should just pass the strings to the PrintPageViewModel, from what @franssu says, and I agree with, it would couple the two classes.
in this case it is public class ProjectProperty : IProjectProperty
umm
i'll have to read
15:17
meaning that would force the consumer to pass a IProjectProperty to PrintPageViewModel, meaning that'll make the properties always get shown on the page when its printed... meaning you can't pass garbage strings to the constructor, instead you would have to have a IProjectProperty and change those properties to garbage strings and you'll see garbage strings when the page is printed.
hmm
whats wrong with coupling?
Aka I think I'm kind of okay with coupling?
i agree generally you don't want to couple things
but religiously avoiding things is wrong too
its like there are times when globals are good
or a simple GOTO can save a lot of workaround headache
heh, never had to use those yet, whew
but i guess its an opinion really - I'm always more on practical side than the theoretical purist
15:19
okay, how about this other question I have
well as somebody who has come from assembly coding - gotos are awesome in the right hands
I never had any issues because my brain kept track of registers in my head :D
yes but that's because you're awesome
public class AllThings
{
    List<Thing> Things { get; set; }
}

public class SomeThings
{
    List<Thing> SomeThangs { get; set; }
    public SomeThings(IEnumerable<Thing> things) { SomeThangs = things; }
}
lets pretend Things has 5000 items in it
right now I'm basically calculating the number of rows per page that would fit, then creating a Dictionary<int, SomeThings> to "cache" my view models (SomeThings)
if the rows per page changes... how can I adjust my Dictionary key values
Why a dictionary and not a list ?
I debated that, and I should probably go with that
because I know they will always be in order.
15:30
you should go for a list ?
but my question is how to deal with resizing. lets say after first pass every item in the List<SomeThings> Pages has SomeThangs.Count == 50. Then the size of the page changes... and I need to change items in the list from 50 to 75.
since experts are talking, i'm gonna go back to recovering this phone
so Pages[0].SomeThangs.Add( Pages[1].SomeThangs.Take(25) );
@Maverik I think you'd be great for answering this question!
i feel you might have done this before
what is that code?
15:33
what do you mean?
your attempt to pagniate? :D
why add from page1 to page0?
yeah
because the size of the page changed, so it can fit more Thing per row
hmm
doesn't feel right
but i see the real question is above that
ok yes, your methods going to be ugly
why not just recreate the pages?
I could do that too...
what about calling clear on each objects SomeThangs?
or should I just clear the Pages list?
15:51
are you trying to get it working or are you trying to optimize it ?
trying to optimize it... It's not implemented at this point. trying to pick which approach I want to follow
just simply recreate the pages
it's free and you might not need to optimize it anyway
also don't use Skip.Take approach
you'll do multiple enumerations
I'd do it the old fashioned way of looping
so you can do it all in one go
yeah I know, I was just painting the picture so you guys would get it
oh ok
15:57
is this something I could use TPL with :O
I still haven't been able to solve this list problem displaying horizontally instead of vertical.
<StackPanel Orientation="Horizontal"/> ;)
doesn't work.
You need to show us what you have
@DemCodeLines no?
All I am asking for is a simple list in which items, which are tapped on, can show a checkmark next to them. Can Windows Phone 8.1 XAML/C# not even give me that much?
16:09
I basically showed you the code last week and you took offense to it.
The list is half cut off
look at that. There is your list of items that wrap
But I don't need a wrap.
I need it to show it in a list.
one after another.
The pastebin code outputs this:
It's cut off.
why did you cut it off ??
(just kidding)
16:16
it's not cut off, you have to scroll.
ohh the right side?
simple
        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <TextBlock Text="{Binding Property1}" Style="{ThemeResource ListViewItemTextBlockStyle}"/>
            <TextBlock Grid.Row="1" Text="{Binding Property2}" Style="{ThemeResource ListViewItemContentTextBlockStyle}"/>
        </Grid>
That broke the list...
How?
Now it's all one after another in a line that breaks to next line and on and on
16:20
uh.... no?
Grid.Column puts it in the same position the stackpanel was
assigning the row puts Property1 on the top, Property2 on the bottom.
change the StackPanel to Grid.
see?
even you're confused.
<StackPanel Orientation="Horizontal">
    <Border Background="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}">
        <Image Source="{Binding Property3}"
               Height="99"
               Width="99" />
    </Border>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock Text="{Binding Property1}"
                   Style="{ThemeResource ListViewItemTextBlockStyle}" />
        <TextBlock Grid.Row="1"
does this work?
Well I don't know why you're using a GridView, that's probably one reason
I gave you the code previously and you told me I'm a noob
and that was the output.
@NETscape When did I say that?
Jul 21 at 20:05, by DemCodeLines
you spent your time to show me that...
Jul 21 at 20:05, by DemCodeLines
you know im not a first time programmer
Jul 21 at 20:02, by NETscape
https://gist.github.com/anonymous/ed8bc8214d92691dc63e
that gist is basically the same as what that picture shows, except the item template is a little different
@franssu what do you mean it's free?
16:37
I told you I am not a first time programmer. That has nothing to do with you.
hey all
Hey, DemCodeLines. Are you a first time programmer?
What do you think?
you said you weren't a first time programmer, that's insulting to me because you took my gist with a grain of salt.
@Maverik Any idea when that oneplus invite dies? Was it today?
16:40
@NETscape How about we look at the context of that post and when I said it and what I was referring to?
I think, at best, you're taking yourself a bit too seriously.
There's nothing about your gist that would make me want to say "I'm not a first time programmer"
I demand you two hug, now.
@Billdr I already gave them away mate - they were dieing yesterday in 7 hours
16:41
@Maverik No worries. I was torn between that and getting littlebits.com
Yes, I spent my time to show you a gist. Yes, I explained what was happening in the gist and how it is behaving. You said you're not a first time programmer. If you weren't responding to my messages, what were you responding to? Either way I gave you the gist again, do what you want with it
If i get new ones (and i should) i'll yell again and you'll have 5 days to deal with taht
@NETscape sigh
6 mins ago, by DemCodeLines
hugs
@NETscape Hug, damn you.
oneplus invite?
16:50
yes
what does that entail?
your ability to buy one
ah
is that what you're playing with
oh nah
somebody in office tried to do something an HTC One X+ and fried its radio partition in the process
and I'm trying to recover that
what do you try to do that makes that happen.... microwave it?!
16:52
I've learned quite a bit in the process, but damn HTC.. i just because they wouldn't let me update its partition, i think i can't repair it
just because its a challenge and I know i can do it!
but there's sooo many "firewalls" in place from HTC that is sucks
@ReedCopsey want to give some input on this. Not sure if that paging collection from silverlight you linked me would apply here.
you start from CID / PID checks.. then corrupted zip files
then once you decipher that, you're presented with encrypted zip file
decrypt that thing and you have random partition images... ok.. that's the software part done
but now you need to S-OFF the bootloader.. which so far nobody seems to have achieved on 1.72
so yea.. damn HTC assholes
@NETscape You'd have to just recompute it
i'm still wondering how you fry the radio partition...
not literal fry
its corrupted basically
i dont know if they wiped it and never wrote back on it or they wrote but lost power or .. may be just unplugged in middle
whatever the case may be, if only it'd let me flash the image, i can fix this phone now but i'm stuck on inability to flash
"remote not allowed" (HTC's firware denying flash)
16:56
@ReedCopsey right, but after I recompute rows per page, do I remove Y from Page 2, and add Y to X on Page 1?
or do I .Clear() all pages
then .Add new Page(newThingList)?
it's probably easier to just build an entirely new Dictionary
and replace the original
because that can happen on a BG thread, adn the entire UI is going to be recreated anyways
anyway to make listbox item act like a gridview item for its selectionmode "multiple" property?
On gridview, when you press on an item, it shows a checkmark next to it. Listbox items don't do that and instead simply highlight the item.
yes, you add a checkbox to your listbox item and bind to its Selected value
Well GridView is what is causing the wrapping and making it two rows
Yeah, I just like that effect that you get when you click or tap on a gridview item
17:04
you could add any effects you want to the selection event of a listbox item
like that checked item.
yeah, that's a path
a path is a way of drawing shapes
@NETscape is saying the checkmark is a path, not an actual checkmark
i dont think that really matters too much, its more that it is an element inside the listbox item that has a trigger on Selected to show/hide
I just need that effect for a listbox item
17:08
have you ever written a trigger?
in c# and other languages yes
but, I suck at xaml
        <TextBlock Name="ItemToShowOrHide" Text="Doesnt Matter">
            <TextBlock.Resources>
                <Style TargetType="{x:Type TextBlock}">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding IsSelected}" Value="True">
                            <Setter Property="Visibility" Value="Visible"></Setter>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </TextBlock.Resources>
        </TextBlock>
i am using a textblock for the example, but you can use any type
the trick for you will be to figure out what goes into the Binding property
"DataTrigger is not supported in a Windows Phone Project"
now where is the assets panel sigh
17:16
hahahah
i was afraid of that. i got nothing on windows phone junk
there must be something similar
1
Q: Conditional styling of an element in XAML

alitalegI am building a Windows phone 8 app that has a view model property of: public bool IsReply {get; set;} In my xaml code, I would like to distinguish two cases: IsReply=True <Grid Margin="0,0,0,0"> ... </Grid> IsReply=False <Grid Margin="40,0,0,0"> ... </Grid> Basically, I would like to ...

done googling for the next 4 hours
17:42
so not possible, in other words.
@Julien that doesn't actually display a check mark tho
no, it displays a textblock
but the textblock could be a check mark
18:03
Unit test savvy people! My app munches text files. I want to give it a few constellations of test data. I plan to add this test data to my test project. Is there a good way to approach this so that my test project can access these files cleanly? I want to minimize my "try/catch" blocks here.
18:14
@Billdr are you going to be feeding it valid file names?
i dont get it why its an issue
isnt that pretty easy
i dont think you would need any try/catch
for eg check if a directory exists and have all your test data inside it
I would say put test files either in a central location or in the solution folder + solution. Have it open a file which has 1 file name per line, loop through the file list testing whatever
@JohanLarsson do you usually draw paths in blend?
@NETscape I was thinking of referencing files in the solution.
Like you would with icons or something. I suppose I could just point it to the application directory + "appropriate folder/".
19:10
@Billdr application directory?
like C:\Program Files?
You don't even really have to add them to the solution itself... You could add somewhere in the solution/project folder
then from wherever your output is, you can use relative path to load the files
19:38
@NETscape I meant you should already have some function to create the pages so you could just reuse that
 
1 hour later…
20:44
Hey guys. I'm having an issue in my XAML, if you're available.
what's wrong @WilliamThomasWaller? (typically good to just ask :) )
 
2 hours later…
22:31
Hi All! I'm having problems with trying to get my mainview in my MVVM WPF application switching its view! I know my "Mainviewmodel" is being updated appropriately to its correct view model
I have my datatemplates defined in my app.xaml resources
is there a trigger or propertychanged event I need to raise for my view to be updated?

« first day (648 days earlier)      last day (3501 days later) »