Search Results

Search found 8 results on 1 pages for 'darja'.

Page 1/1 | 1 

  • Is WPF Decorator class useful?

    - by darja
    I need to create control to draw border around its child. So, I have created class and derived it from Decorator: class RoundedBoxDecorator : Decorator { protected override Size ArrangeOverride(Size arrangeSize) { //some source } protected override void OnRender(DrawingContext dc) { //some source } } It works fine, but I have some doubts about using Decorator as ancestor. I have found in MSDN that there are no special methods or properties in it, only derived from its ancestors (UIElement or FrameworkElement). ArrangeOverride and OnRender are also derived. So, what for Decorator class was designed and does it makes sense to use it? Or I can derive from FrameworkElement?

    Read the article

  • Unidirectional OneToMany in Doctrine 2

    - by darja
    I have two Doctrine entities looking like that: /** * @Entity * @Table(name = "Locales") */ class Locale { /** * @Id @Column(type="integer") * @GeneratedValue(strategy="IDENTITY") */ private $id; /** @Column(length=2, name="Name", type="string") */ private $code; } /** * @Entity * @Table(name = "localized") */ class LocalizedStrings { /** * @Id @Column(type="integer") * @GeneratedValue(strategy="IDENTITY") */ private $id; /** @Column(name="Locale", type="integer") */ private $locale; /** @Column(name="SomeText", type="string", length=300) */ private $someText; } I'd like to create reference between these entities. LocalizedStrings needs reference to Locale but Locale doesn't need reference to LocalizedStrings. How to write such mapping via Doctrine 2?

    Read the article

  • Reasons for Parallel Extensions working slowly

    - by darja
    I am trying to make my calculating application faster by using Parallel Extensions. I am new in it, so I have just replaced the main foreach loop with Parallel.ForEach. But calculating became more slow. What can be common reasons for decreasing performance of parallel extensions? Thanks

    Read the article

  • Dynamically adding UserControl to list in ASP.NET

    - by darja
    I have UserControl, which is used for editing fields of some object. I had a page with this control, where user filled the fields, pressed "Submit" and object inserted in DB. And everything was Ok. But now user wants to insert several objects by one submit. So I need to implement dynamic adding of this control. What is the simpliest way to do it? The only way I see is to specify "+" button and to create control in its OnClick handler. But it is very dull. I think it is very common issue and there are better variants.

    Read the article

1