« first day (1085 days earlier)      last day (3064 days later) » 

12:00 AM
ok, OK
 
Haha, typo.
 
Why don't they package Immutables with .NET rather than as a Nuget Package?
 
dunno
kind of nice with packages though, enables out of band releases
many things are like that I think, ef, asp, ...
 
Definitely seems to be the direction MS is going for anything they don't think everyone will want
Now if they just had a better package manager...
 
12:13 AM
Hahaha, you guys are great.
Works perfectly.
@JohanLarsson Thank you.
 
 
6 hours later…
6:07 AM
Morning!
 
6:57 AM
hi
I have problem, no anyone here?
 
write it and maybe someone will answer
 
ok
I want pass selected id row from Datagrid with MVVM
 
ok, so bind it?
 
?
How!!!!
 
what have you tried?
 
7:03 AM
pass selected with datacontext
ContextMenu
 
eh, how much mvvm knowledge do you have?
 
low
 
ok, so do you have a viewmodel?
 
yes
 
and it's connected to the window with the datacontext?
 
7:07 AM
yes, DataGrid show all data, I want if user selected pass selected item ( ID ) to viewmodel
 
I'm trying to do it myselfe. hold on
 
ok so just <DataGrid SelectedIndex="{Binding Index}"...
does that work, or have you already tried that?
 
give me sample or article link. thx
 
I don't have any
but you have to have a property public int Index{get; set;} in your viewmodel.
do you understand?
 
7:20 AM
yes
 
ok, so does it work?
 
what is it that doesn't work?
maybe you can show some code?
 
now, i will test sample, hold on
yes
wait
i use the following code :
public int Index{get; set;}
in viewmodel but show me number of selected item
but i want show me first cell of row selected
first cell of row is :
6dc444e0-3489-4131-8289-6a9df9bbd87a
 
hmm I don't really get what it is you want... so if you press the third column you wish to get the data from the first column in that row?
 
7:29 AM
yes, see the following link:
first row is selected, I want pass key.
to viewmodel
if I will use <DataGrid SelectedIndex="{Binding Index}"..., I get 0 numer, I want get key of selected
Do you understand?
 
mm I get it.. I'm working on it, but I think you should get Selected instead of selected item
 
ok SelectedItem instead
then you get the full row
and then you can get the Key from that
 
Oof. Using "By" without "From" for TranslateTransform pushed my text off the screen ;)
 
wait ....
@Markus Thank you
it working
 
7:41 AM
great!
WOHO I HAVE HELPED SOMEONE! :)
 
Hello
 
:;)
 
Hello
 
@Markus How I can add star to you
 
you can't
 
7:42 AM
ok, thx
 
np
 
8:26 AM
@Markus
 
mhmm
 
Best way to load usercontrol and Management User in WPF MVVM?
Also switch between usercontrol?
 
hmm, don't really know, I have always had static controls
(loaded from start)
 
How to management user permission in WPF MVVM?
 
I don't think that there's any standard way, you will have to make your own way. We are binding visibility and enable to different properties dependent of permissions
 
8:33 AM
Good, but hacker can enable on?????
It
 
hehe that might be possible, I don't really know...
 
;)
ok can ask next Question?
 
don't ask to ask a question, just ask it. But it's not possible that anyone can help
 
Ok, I have software with SQL server management
 
ok
You are right about the hacker stuff by the way...
 
8:41 AM
My SQL Server in here:
smarterasp.net
 
ok
 
for Insert, Remove, Update and Read
Software connect to smarterasp.net
sql server ok.
Now, problem is : How I can speed up software for CURD. also if software not connect to Internet, use SQLite for save data
 
You don't implement the user rights just in the ViewModel by disabling/showing controls, you should have it in your business logic also, and any operation that is constrained by the user rights should check the access rights are provided.
 
@NovitchiS In the ASP.Net MVC I use Authorize attribute,, . in WPF How can use Attribute for management Method?
 
20
A: How to Snoop proof your wpf application?

Kent BoogaartBy implementing security properly. If your "security" can be thwarted with a tool like Snoop, then you're doing it wrong. Suppose there's a command that only certain users can execute. It sounds like the only place you're enforcing this is at the UI level (by disabling the corresponding button, ...

 
@OmidNasri well that's not really a question we can answer here, first of all it has nothing with wpf to do (which is not that important), but more important is that it's not a simple question, it's a project...
 
Hello all
 
Hi, now lunch
 
I had never worked with Command in WPF. How I can create simple command?
I tried this:
    let DoSimpleCommand() =
      MessageBox.Show("Вызываем 'DoSimpleCommand'.");

    let simpleCommand = new Command(DoSimpleCommand)
 
9:02 AM
@FoggyFinder Basic MVVM and ICommand Usage Example, Following link:
 
Error - type Command is not defined.
 
Thanks
Yes, I used that (second link) example. I did not seen that the Command class is defined in the end of the article.
 
Download the sample of first link in code project.
 
I write in F#, I'm not sure this is the right approach for him
 
9:08 AM
You working in F# language?
 
No, programming it is my hobby. I learning F# and WPF now
 
Also see the link:
end article, you can download the sample project. ok
@FoggyFinder ???
 
Saw. In FSharp.ViewModule much has already implemented
Think, now I rewrite code from C#. The best possible solution I'll find later =)
I found an answer. Earlier, I incorrectly asked a question.
Hm..don`t working
Understand..must add member
It`s working:
    let DoSimpleCommand() =
      MessageBox.Show("Click")
      ()

    let simpleCommand = self.Factory.CommandSync(DoSimpleCommand)
    member self.SimpleCommand = simpleCommand
Perhaps, it was a question on F#, than on WPF. I often confuse them =)
 
9:56 AM
hi guys, is there a way to check if any changes were made to a model?
 
what kind of model do you mean?
oh you mean the datamodel?
 
yep datamodel for a SQL View
 
so you want to see if the SQL data has been updated?
 
if any change has been made to the properties' values in the model
i basically have a popup and want to determine if any change was made to the values bound to the model when it closes
 
10:10 AM
in model attach handler to NotifyPropertyChanged and set a readonly field on the model with modified flag
 
 
2 hours later…
12:14 PM
Where's @Катерина?
 
'morning all
 
Morning Lynn
 
12:34 PM
@Lynn Crumbling, Hello. By my watch - 15:30 =)
 
user4433485
12:59 PM
Sorry @markus I've not been active for couple days :3
 
But now you are!
 
user4433485
Yesh!
 
user4433485
I've lost control :p
 
Oh no.. now it's time for coffee :)
 
user4433485
it is!:D
 
user4433485
1:00 PM
well
 
user4433485
my colleagues are too busy .. gotta wait
 
brb
 
user4433485
I've been programming in C lately:3
 
user4433485
sure!
 
@FoggyFinder Ha.. it's almost the weekend for you!
 
1:16 PM
=)
 
1:26 PM
Back!
 
user4433485
me2
 
Maybe we should start an Automotive room instead :)
 
user4433485
hehe
 
user4433485
I'm noob:p
 
user4433485
but meh I want to do this for ages.. my own navigation in my car :3
 
user4433485
1:31 PM
With a custom welcome message
 
user4433485
it's my dream :D
 
hehe ok
well, it's a big job
 
user4433485
it is :p
 
user4433485
I've got a raspberry pi from my internship
 
Get a NetDuino 2! :)
 
user4433485
1:35 PM
they told me to play with Arduino
 
Then you can do everything in c#
(as opposed to c)
(NetDuino runs on the .net micro framework)
 
what's NetDuino?
 
You can actually STEP through code, with breakpoints.. running on the remote embedded system.
It's like Arduino, except running .net instead of C.
 
ok
 
I wrote some code to move a servo and take readings from some IR sensors.
(Pinewood Derby Track timer/release system)
w/ WPF frontend to receive data from the serial port on the device (race results)
 
1:38 PM
sweet
 
user4433485
ah
 
user4433485
Well I'm noob in C# as well
 
user4433485
so doens't matter really:p
 
Wonderful little device.
And cheap... I picked up the Netduino for $35...
a servo was $10.
Who would have through that for $45, you can do robotics...
 
user4433485
Well Markus
 
user4433485
1:40 PM
How is your C?
 
you will get a lot longer with C#
ALOT!
especially if your doing GUI
 
user4433485
But.
 
user4433485
I heard that when you learn C and master it
 
user4433485
you can learn other languages much faster
 
user4433485
like Objective-C and C++
 
1:45 PM
Well, C isn't object-oriented...
in some ways, it allows bad habits to develop from using a language where there's no such thing as classes...
 
user4433485
aha
 
user4433485
But for domotica / robotica / automotive is C the way to go isn't it ?
 
domotica?
 
user4433485
home automation *
 
if your meaning robotica like industrial robotics, then no, they have their own programming systems.
automatic, well engine and controlls are often made in Simulink, and then generated to C
but sure there are a lot C in automotive, but I have also been involved in a c++ project so....
 
user4433485
1:51 PM
You know when I read C++
 
user4433485
I want to vomit
 
user4433485
it's like impossible to learn
 
domotics... well, it's probably C/C++ in arudino, or Java if you run android stuff
C and C++ doesn't differ that much, the problem (as I see it) is that you have to do so much stuff that you fast get lost in all the code
if you want a list, you'll have to create your own list...
if you want a window, you have to code your own window.
that's why I like C#
 
user4433485
aha
 
user4433485
but with C# we can't really do automotives
 
1:58 PM
nope
 
user4433485
so actually, when you want to do stuff like automotives you have to learn C/C++
 
user4433485
What about Python?
 
or Android
Python is great when you want to do something fast. But it is not for automotive
 
user4433485
ahh
 
user4433485
Why would someone use Python?
 
1:59 PM
It's great to create a file parser for example
 
user4433485
many python developers in the netherlands
 
user4433485
the creator of python is dutch as well I think
 
ok
 
user4433485
but I can't really see why
 
well it's good for many stuff. and it's easy to learn
 
user4433485
2:00 PM
true
 
also, its more or less platform independent
 
so is c# wink
 
well...
 
user4433485
I'm bored
 
user4433485
and when I say bored, I mean very bored
 
2:10 PM
bored enough to work on a roslyn c# -> F# transpiler?
 
hehe that must be really really bored! ;)
 
user4433485
lol
 
@Катерина Have you played 2048 or Agar.io ?
^ those are both a good huge waste of time.
 
user4433485
Lol
 
user4433485
what are those?
 
user4433485
2:19 PM
I need a 40 minutes + waste of time :p
 
user4433485
im looking for something that is quite useful like a algorithm game or so
 
user4433485
this?
 
user4433485
Wahoo it's damn nice:d
 
user4433485
2:34 PM
score:3248
 
hi
How I can create project with multiple user control
and switch between user control
 
you have a few options
you can use a ContentPresent with a DataTemplateSelector
 
user4433485
stackoverflow.com/questions/22342854/… @LynnCrumbling check his score like what?!
 
you could just load both UC's and toggle the visibility
you could use Tabs
i think the right answer depends on the flow of your app
 
2:55 PM
I'll be going. have a nice weekend
 
3:51 PM
you too :)
 
4:11 PM
afk for a while, upgrading to win 10
 
4:22 PM
NO!!
Don't do it, @BradleyDotNET
 
I have a new question =)
I try add binding TextBox.Text
but I also need track press "Enter"
can I do so that the binding worked, but not the command:
<TextBox TextWrapping="Wrap" Margin="10" FontSize="16" Text="{Binding Texts, Mode=TwoWay}">
also I can do to make the command, but not the binding:
        <TextBox.InputBindings>
            <KeyBinding Command="{Binding SimpleCommand}" Key="Enter" />
        </TextBox.InputBindings>
Simple union does not work:
        <TextBox   TextWrapping="Wrap" Margin="10" FontSize="16" Text="{Binding Texts, Mode=TwoWay}">
        <TextBox.InputBindings>
            <KeyBinding Command="{Binding SimpleCommand}" Key="Enter" />
        </TextBox.InputBindings>
        </TextBox>
 
works for me
copy and pasted your textbox
 
Hm...
 
        private RelayCommand _cmdTestButton;
        public ICommand SimpleCommand { get { return _cmdTestButton ?? (_cmdTestButton = new RelayCommand(TestButton)); } }

        public void TestButton(object o)
        {
            var temp = "Yes";
        }
 
Perhaps, I have an error in code:
let text = self.Factory.Backing(<@ self.Texts @>,"")
member self.Texts with get() = text.Value
                  and set(value) = text.Value <- value
 
4:33 PM
? what language are we coding in
 
let simpleCommand = self.Factory.CommandSync(DoSimpleCommand)

member self.SimpleCommand = simpleCommand
F#
 
you on your own friend
 
@FoggyFinder what do you want Enter to do?
you may need to set TextBox.AcceptsReturn = true;
but idk what side effects that'll have
 
I want to know the text in the TextBox.
 
Texts holds the text in the box
you dont need an enter key to get it
 
4:42 PM
@ReedCopsey f# .... ^ can you help @FoggyFinder?
@FoggyFinder We'll see if he responds to the ping. He'll probably be able to help, if he does.
 
Thanks
 
 
1 hour later…
5:52 PM
so what's the problem? You're trying to fire a command when enter is pressed in the textbox?
 
I want get TextBox.Text , when user press "Enter". Command work fine, but binding value - is empty. If I move command to Button - binding value not empty
 
You need to set the xaml for text box to include UpdateSourceTrigger=PropertyChanged in the binding
that will cause the binding to update every character, so when enter is pressed, the binding will be current
otherwise, it only updates the binding on Lost focus
<TextBox Text="{Binding Path=Texts, UpdateSourceTriggerproperty=PropertyChanged}" />
(+ your other stuff, of course)
 
6:08 PM
Thanks, worked
 
@Julien btw - there's absolutely no reason to do the lazy evaluated RelayCommand thing - that's really a stupid pattern
just do: public ICommand SimpleCommand { get; } = new RelayCommand(TestButton);
 
yeah, nice & clean with C#6
 
oooooo
 
or, in C# <=5:
 
TestButton must be static for that to work right?
 
6:15 PM
yeah that doesnt work for me
 
private readonly RelayCommand _cmdTestButton = new RelayCommand(TestButton);
public ICommand SimpleCommand { get { return _cmdTestButton; } }
 
boo i want one line hehe
 
yeah - though that's doable with his
but - main thing - the "set to null and check for null and lazy initialize" thing is useless on commands
 
@ReedCopsey second example doesnt work either. still wants static
 
1) commands are very, very little overhead, so not worth lazy initializing in the first place, but more importantly, 2) always going to be initialized in a VM since you're binding it to the view anyways
(yes, but your method could be static ;) - if you need instance method, assign in constructor)
 
6:17 PM
public ICommand SimpleCommand { get; set; }
and then in c'tor
SimpleCommand = new RelayCommand(TestButton);
ive always done the lazy load way, this certainly seems nicer
 
private set
would be better
 
no set
 
and, if C# 6, leave it off
 
(C# <6 needs a private set)
 
6:20 PM
yea
 
private it is
havent touched 6 yet
 
it's nice - they dropped the best features they had originally stolen from F#
but kept a few of them (like auto prop initializers)
 
yeah i read a bunch about it. some really nice anti-boilerplate stuff
which i love
 
still, crippled compared to what it would've been if they had kept inline constructors
still way too much boilerplate in C# - but it's getting better slowly
 
6:51 PM
they also dropped primary constructors =(
 
7:11 PM
yep - primary constructors were what made the inline stuff really useful
 
 
1 hour later…
8:12 PM
Hi all, random question: is it possible to reference a StaticResource in CodeBehind?
 
Reason being, I've got a variety of canvases with Shapes drawn on them, but some of the Shapes are only supposed to be drawn when the app is in a certain 'mode'. But I'm not sure how to clear the glyph in code behind... is it possible
?
 
FindResource will allow you to find th em
not really sure what you can do with them though
 
8:27 PM
i want to set a property on all items in a collection
best way?
jsut a foreach? seems like there would be something better
 
dont think so
subscribe each item to a message
 
@Kyle Humfeld, I recently familiar with WPF, but aren't you using Binding for the data? Then you can just remove items from the collection, at your convenience.
 
and send an update message
pretty sure thats worse hehe
 
@Julien that's to me, right? IRT your subscribe/update comment... not Foggy, right? lol
 
possibly, both :D
 
8:56 PM
So in my XAML, I have this:
CalculatorMode="{Binding CalculatorMode}"
works great
Then I just added this:
ShouldShowShapeBlue="{Binding ShowShapeBlue}"
and it can't determine the value of that variable. They're both public properties on the VM, and at the moment, the latter is just a getter with 'return true;'
Any thoughts?
 
as in, its not showing?
look at the output window, do you see a binding error?
 
No binding error, it crashes when trying to render the Page
error message: Failed to assign to property 'FinCalc.CalculatorButton.ShouldShowShapeBlue'.
At present, that's the only UC on the page, though once I get this ironed out, there will be a whole bunch of them
 
did you create the DP properly?
 
when I hardcode the value to 'True' or 'False', it works, so I infer from that that the DP's set up correctly
I just followed pattern with the CalculatorMode DP that I'd set up months ago
To make matters better "The text associated with this error code could not be found."
So then I changed out the bound variable to 'FindMe', and set that up in my VM from scratch, but it can't find that either. It just doesn't seem to be able to find anything bound anywhere for this property for some reason (I've tried binding to the Page, to the App, to the VM, to a property-object of the VM, none of it works)
It's weird, though, in looking further, it appears that I did NOT set up the DP correctly... so why did it work with hardcoded values?
 
9:16 PM
what part of the DP wasn't correct?
 
I just didn't do propdp-tab-tab at all, I only did prop-tab-tab
So it wasn't any kind of DP from the get-go
I was following pattern, but with something else that's apparently not a DP, and doesn't have to be
It looks like now that it's a DP, it might be working... but I don't remember what I set up my calling function to do, gotta check that now
That's the problem with trying 100 things, you lose track of what eventually works...
Hrm, the bound value is 'true'... but the DP treats it like 'false'. So I'm inferring that the value isn't making it to the UC through the DP
Then when I hard-code it to True, it also doesn't act like the value is 'true'... gotta check on why that's happening
 
 
2 hours later…
11:03 PM
@LynnCrumbling lol
 

« first day (1085 days earlier)      last day (3064 days later) »