Bug 15015 - NSParagraphStyle.LineBreakMode throws NotImplementedException
Summary: NSParagraphStyle.LineBreakMode throws NotImplementedException
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.0.x
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-09-26 09:57 UTC by Andrew
Modified: 2013-09-26 12:00 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Andrew 2013-09-26 09:57:30 UTC
Almost any setter of NSParagraphStyle throws NotImplementedException. Is there a way to work around this issue?

    public virtual UILineBreakMode LineBreakMode
      [Export("lineBreakMode")] get
        if (this.IsDirectBinding)
          return (UILineBreakMode) Messaging.int_objc_msgSend(this.Handle, Selector.GetHandle("lineBreakMode"));
          return (UILineBreakMode) Messaging.int_objc_msgSendSuper(this.SuperHandle, Selector.GetHandle("lineBreakMode"));
        throw new NotImplementedException();
Comment 1 Sebastien Pouliot 2013-09-26 12:00:54 UTC
That's because it is a read only property [1]. If you want to use the setters you need to use `NSMutableParagraphStyle`.

[1] https://developer.apple.com/library/ios/documentation/cocoa/reference/applicationkit/classes/NSParagraphStyle_Class/Reference/Reference.html#//apple_ref/occ/instm/NSParagraphStyle/lineBreakMode