Search:

Type: Posts; User: LuckyLuke82

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    4
    Views
    5,790

    Re: Async in ViewModel - best practices

    😁 Thanks, good to know. Never imagened that this of people also exist here.
  2. Replies
    4
    Views
    5,790

    Re: Async in ViewModel - best practices

    Hi Sherin,

    thanks for response. I agree with you on certain points, but not all.


    It is CPU bound work here. Because I'm showing animation while fetching data from DB. And getting DB data also...
  3. Replies
    4
    Views
    5,790

    Async in ViewModel - best practices

    Hello everyone,

    I'm using View-model first approach. In project that I'm currently working on I have a lot of cases where I need to fetch data from DB. Data is being used for binding controls...
  4. Re: Dependency injection - some explanation

    I've read about that too, unfortunally I haven't really tried that in any of my project so far.

    As said, I'm a newbie in WPF, and current project I work on is my first MVVM app. Any I don't use...
  5. Re: Dependency injection - some explanation

    Hi PlausiblyDamp,

    thanks for response.

    I know about interfaces and how to use, but so far I didn't quite need to use them. As you said, I allways use same instance of Class1 in my viewModels.
    ...
  6. [RESOLVED] Dependency injection - some explanation

    I'm allways confused about term "dependency injection".

    Let's take a look at these two examples:

    1.) Constructor injection


    public class SomeClass
    {
    private readonly Class1 class1;
  7. Replies
    3
    Views
    4,220

    Re: Flowdocument Table with rounded corners

    That Is not possible with Table, you need to add border in BlockUIContainer, and UI element cannot hold ContentElement.
  8. Re: How to display a list as comma separated value in DataGrid column

    For the first part - how to add just three ingredients - I think you should take a look at multibinding. And for second part - adding elipsis if some condition - maybe some trigger that im not aware...
  9. Replies
    3
    Views
    4,220

    Flowdocument Table with rounded corners

    Hi,

    I'm wondering - as the title says - If It's possible to create a rounded corners in Flowdocument Table (type of ContentElement) ? And how ?

    Thanks for any help !
  10. Re: Center in Form horizontally for controls on Form resize

    Ha,

    It worked, like a charm, without any coding :D

    Thanks jm, for one-less headache :wave:
  11. Re: Center in Form horizontally for controls on Form resize

    Hi jm,

    I was thinking same but didn't try It so far. I'll see what comes up in the end, thanks. I used Panel and docked It to bottom because DataGridview is above.
  12. Re: Center in Form horizontally for controls on Form resize

    Hi Peter Swinkels, I edited question with screenshot.
  13. [RESOLVED] Center in Form horizontally for controls on Form resize

    Hi,

    I have 3 buttons on a Panel, and via Visual Studio option Format>Center in Form>Horizontally I centered them all together to apper in middle of Form.
    They are all positioned in same Top...
  14. Re: cancel System.Threading.Tasks.Task on Form_closing

    I think I solved my problem. I was missing a lines in Get_Data:


    Sub Get_Data(ByVal Sql As String)

    'Fill dataTable
    Try

    Using conn = New...
  15. cancel System.Threading.Tasks.Task on Form_closing

    Hi,

    I run a new thread on Form1_Load, like this:


    Private cancel_task As New CancellationTokenSource
    Private new_task As Task

    Private Sub Form1_Load(ByVal sender As Object, ByVal...
  16. Re: [RESOLVED] Async - Datatable doesn't fill using DataAdapter

    Yes I agree, we are way out of original question. Will do a research and testing about things you mentioned though, before any new topic.
  17. Re: [RESOLVED] Async - Datatable doesn't fill using DataAdapter

    Well I don't quite see how to implement that in my case.

    Our users mostly search data in a range of month(s) or year(s). And we are in financial company working with money transactions, so you...
  18. Re: [RESOLVED] Async - Datatable doesn't fill using DataAdapter

    After I load data into Datatable I Invoke DatagridView to get records from filled DataTable, so that part is fixed for me, no worries about that. But thanks for advice on DatagridView, It will...
  19. Re: [RESOLVED] Async - Datatable doesn't fill using DataAdapter

    Yes, you are right, there were more than one tasks, but then I deleted one. About thread safety - I don't know. Do you suggest anything else ?
  20. Re: [RESOLVED] Async - Datatable doesn't fill using DataAdapter

    Yes It is, luckily. I didn't see any error though, that was strange. However, I'm facing another problem now. Maybe you can help me with this one:

    I've started new thread because there is a lot of...
  21. Re: Async - Datatable doesn't fill using DataAdapter

    Problem solved. Damn, It had nothing to do with code I provided, but one of parameter values I pass had unexpected value (condition_2). I had to fix It and Trim string, and now It works as expected. ...
  22. Re: Async - Datatable doesn't fill using DataAdapter

    I tried with different framework, but strangely nothing happens. Looks like C# has something that VB.NET doesn't, in order to work properly. Can you think of some different example to fiil my...
  23. Re: Async - Datatable doesn't fill using DataAdapter

    Hi si_the_geek,

    Yes, my Fill_Data works just fine without task. I'm currently reading something about DataAdapters that they don't support TPL methods. However, using same OracleClient...
  24. Re: Async - Datatable doesn't fill using DataAdapter

    That is a Oracle cursor parameter that returns a value of query. This is allways present when you work with stored procedures in Oracle. And It works just fine when using on UI thread, so I don't...
  25. [RESOLVED] Async - Datatable doesn't fill using DataAdapter

    Hi,

    I'm trying to fill Datatable on another thread, but I'm allways getting just 1 row in It. I'm not so experienced regarding working on different threads, so I'm a bit lost of ideas how to solve...
  26. Re: [RESOLVED] Custom color picker - Luminance slider for picked colour

    Sure, as I told, send PM to me.
  27. Replies
    8
    Views
    3,858

    Re: [RESOLVED] Translation to VB.NET

    Thanks for further explanation si_the_geek, now I completely understand. Your code-change suggestion is also noted and allready included, thanks for that :)
  28. Replies
    8
    Views
    3,858

    Re: [RESOLVED] Translation to VB.NET

    Well, I never investigated this to see what is really happening in background. I found these lines of code somewhere and have used It ever since.

    And to be honest, code isn't quite ...
  29. Replies
    8
    Views
    3,858

    Re: Translation to VB.NET

    Thanks guys, both of you, specially David for code example. My code now works in VB.NET too.



    To answer this : I've never thought in a way like this. I use this code quite long time and so far...
  30. Replies
    2
    Views
    452

    VS 2015 Re: Excel crash problem

    I've used Interop a while ago, and so as you Ive also bumped into a lot of issues with It. I strongly suggest you to try OpenXML or ClosedXml etc. libraries instead, you'll find out that Interop is...
  31. Replies
    8
    Views
    3,858

    [RESOLVED] Translation to VB.NET

    Hi guys,

    I'm trying to get my C# code translated into VB.NET but I'm facing troubles, so I turned to you guys.
    Code is for re-positioning messagebox to desired location (not just center of...
  32. Re: Usercontrol default Gotfocus and Lostfocus behaviour

    That should do It. Just compile and use control from Toolbox:


    public class MyButton : Button
    {

    protected override void OnMouseEnter(EventArgs e)
    {
    ...
  33. Re: C# - Datagridview - Paint background with gradient with non-relative position

    Yes I've seen my mistake done here, I allready fixed It. About your solution - thanks, It works except when you resize Grid in a matter when ColumnHeaders resize (column header gets bigger if you...
  34. Re: C# - Datagridview - Paint background with gradient with non-relative position

    I even tried with that, startcolor is allways 0:



    Rectangle rc1 = new Rectangle(0, 0, Width, 30);

    var startcolor = (float)(30 / 100 * 0.047);
    ...
  35. Re: C# - Datagridview - Paint background with gradient with non-relative position

    I still don't get how could I calculate when resize happens in one line. Height can be anything. I tried fixing rectangle to height 30:


    _mixedcolors.Positions = new float[4] { 0f, 30/600f,...
  36. Re: C# - Datagridview - Paint background with gradient with non-relative position

    I can't make It. Color is fixed now no matter how I resize datagridview, but smooth interpolation which makes shadow is gone, like I would fill a rectangle with one color only:


    protected...
  37. Re: C# - Datagridview - Paint background with gradient with non-relative position

    Yes, I think that would help me, but how to do a calculation of positions ?
  38. Re: C# - Datagridview - Paint background with gradient with non-relative position

    Hi jm,
    I was hoping someone would notice that. But It doesn't fix problems. First of all, PaintBackground overrides painting background, so in order to paint a fixed rectangle you have to paint...
  39. [RESOLVED] C# - Datagridview - Paint background with gradient with non-relative position

    Hi,

    I've created a Datagridview with custom painting background. What I want is to paint somekind of shadow for column headers that would be fixed even If I resize Datagridview. I've tried that...
  40. VS 2017 Re: VB.NET Metroframework Docking Form on Panel in Tab Page

    First of all, why are you even using Panel ? From what I see you don't even need It...Just set you form to Borderstyle.None and add that in your TabPage. You're lucky, here is something from my...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width