TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Lahiru Mahagamage
NA
45
1.3k
Selecting Eraser for all InkCanvases opened in tabs
Jan 14 2018 2:23 PM
Hello!
I'm using below code to load inkCanvases to tabs dynamically in the same tab control
foreach
(var di
in
DIList)
{
var grid =
new
Grid();
var inkCanvas =
new
InkCanvas()
{
Width = grid.Width,
HorizontalAlignment = System.Windows.HorizontalAlignment.Left,
VerticalAlignment = System.Windows.VerticalAlignment.Top
};
SourcePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @
"Docs\DI\" + di + "
.bmp");
img = GetBitmap(SourcePath);
myImageBrush =
new
ImageBrush(img);
myCanvas =
new
Canvas();
myCanvas.Width = img.Width;
myCanvas.Height = img.Height;
myCanvas.Background = myImageBrush;
inkCanvas.Height = img.Height;
inkCanvas.Children.Add(myCanvas);
inkCanvas.DefaultDrawingAttributes.Color = Colors.Red;
grid.Children.Add(inkCanvas);
var item =
new
TabItem();
item.Header = di;
item.Content = grid;
cw.tabCanvas.Items.Add(item);
// cw.DI.Add(di);
}
So i want to change the Editing mode InkCanvasEditingMode.EraseByStroke of the Canvases when i click a button. I want it to apply for the all the canvases present. How can i do it.
when i do like this inkcanvas1.EditingMode = InkCanvasEditingMode.EraseByStroke it works but i want it to recognize the canvases in present in the tabs and apply erase mode to all. Please help. Much thanks.
Reply
Answers (
0
)
how to deploy web application on IIS on windows server
Traffic light simulation for a crossroad