What shortcut can I use for comments in Xamarin - xaml? - xaml

Note, I'm using Visual Studio 2022, on Windows.
Note2: I found CTRL + / in by googling, but it does not work.
I found a way to comment my code, but is there a keyboard shortcut for doing so?
For example, This is a comment from the code below?
<Label Text="Ukupan iznos: " FontSize="30" Padding="0,2,0,0" FontAttributes="Bold"
VerticalOptions="Center"/>
<!-- This is a comment -->

Try Ctrl + K, Ctrl + C. On windows, this is the shortcut for commenting code both for C# and XAML.

I've been using Ctrl + K + C for Commenting and for Uncommenting Ctrl + K + U

Related

Fonts in custom SVG node Image with vis.js network

I'm looking for nodes that are circles with a font-icon in the middle and the stock label below. This (http://jsbin.com/hiqega/3/edit?js,output) is really close to what I'm looking for except that I need to pass the font name and the icon code to use.
function nodeImage(color, icon, font)
{
var svg = '<svg xmlns="http://www.w3.org/2000/svg" ' +
'width="120" height="120" viewPort="0 0 120 120">' +
'<ellipse ry="55" rx="55" cy="60" cx="60" ' +
'style="fill:' + color + ';stroke:black;stroke-opacity:.5;stroke-width:4;" />' +
'<text x="61" y="63" text-anchor="middle" dominant-baseline="middle" ' +
'style="font-family:' + font + ';font-size:100px;fill:black;fill-opacity:.5;">' +
icon + '</text>' +
'</svg>';
return 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svg);
}
I'm calling this like so nodeImage('red', '', 'FontAwesome') in a page that is already using the font elsewhere so I don't think the issue is that it's not loaded.
Here's a pic of the resulting node
Any suggestions on where I'm going wrong?
I think you need to write nodeImage('red', '\uf03d', 'FontAwesome'). http://visjs.org/examples/network/nodeStyles/icons.html
"Remember! Unicode in javascript is done like this: \uf274 for the unicode f274.
If a node is shown as a rectangle, it means the css is not loaded (or not yet loaded). A redraw will fix that."

RIGHT ARROW not appearing in the PDF file produced using JasperReports

I have this text field that has right arrow included in the text field that I have set but the text appearing in the resulting PDF file has no right arrow with it.
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="Calibri" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{generalManager} + " \u2192 " + $F{manager} + " \u2192 " + $F{teamLeader} + " - EE Count: " + $F{totalEmployeeCount}]]></textFieldExpression>
Note: When I change the font to DejavuSans, the right arrow appears.
Is there any work around for Calibri? I have also searched that Calibri, along with DejavuSans, supports right arrow, what could be the problem here?

reformat XAML in VS 2013 or with Resharper

I have several question about formatting XAML code with Resharper or VS 2013.
How can I set up in Resharper Code Cleanup or in VS add empty line
between XAML / XML tags?
Before:
<Canvas Background = "LightSkyBlue">
<TextBox x:Name = "TextBoxGreen"
Canvas.Left = "150"
Canvas.Top = "50"
MinWidth = "200"
BorderThickness = "3"
BorderBrush = "GreenYellow"
MouseDown = "TextBox_OnMouseDown">
Text from green textBox
</TextBox>
</Canvas>
After
<Canvas Background = "LightSkyBlue">
<TextBox x:Name = "TextBoxGreen"
Canvas.Left = "150"
Canvas.Top = "50"
MinWidth = "200"
BorderThickness = "3"
BorderBrush = "GreenYellow"
MouseDown = "TextBox_OnMouseDown">
Text from green textBox
</TextBox>
</Canvas>
I would like order XAML attributes in logical order or alphabetical
order. After my research I found these options:
Use Xaml Markup Styler Extension but not useful for me because I
use VS 2013. Port to VS 2013 is not finish yet.
Use Xaml Attribute Ordering Plugin to Resharper but this plugin
doesn’t order event handlers for example.
So it exist way how order XAML attributes in alphabetical order? Or how you order XAML attributes?
select your code, and press
Alt+Enter
and select
Format Selection
i think is too late for this answer but the solutions is quite simple. The shortcut keys are: CTRL + K + D in VS2013. that´s the middle of the question.
I hope it's useful.

manipulationdelta for popup window - XAML Windows 8

I am trying to put floating popup windows on screen. I want user to be able to move that popup window anywhere on the screen.
And so I am using:
<Popup x:Name="myPopup" Grid.Row="0" Grid.RowSpan="2" Margin="0, 0, 0, 0" ManipulationMode="All" ManipulationDelta="PopupManipulationDelta" IsLightDismissEnabled="False" Visibility="Collapsed" IsOpen="false">
code behind:
private void PopupManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
var ct = (CompositeTransform)addShapesPopup.RenderTransform;
ct.TranslateX += e.Delta.Translation.X;
ct.TranslateY += e.Delta.Translation.Y;
UpdateLayout();
}
But this is not working. The function PopupManipulationDelta is not even getting called.
I tried using same logic on shapes like rectangle, ellipse and it works fine there.
Can you please help me understand why it's not working with popup?
Thank you.
I believe a Popup does not have any visual representation, so it can't respond to hit testing and thus to manipulation events. Simply put some control inside of it and have that respond to the input events. It can be a Grid with Background="Transparent" if you don't want it to be visible.

ctrl + c keyboard event not working in as2.0

I'm using Macromedia Flex 1.5 with AS 2.0, I want to keep ctrl + c keyboard event for a datagrid, I'm trying following code, but it's not working. What am I doing wrong?
<mx:Script>
<![CDATA[
function myOnKeyDown() {
if (Key.isDown (Key.CONTROL) && Key.isDown(67))
{ mx.controls.Alert.show("Copied Succesfully: ");
}
else
{
mx.controls.Alert.show("Press control + c to copy: ");
}
}
]]>
</mx:Script>
<mx:DataGrid width="100%" height="35%" id="cur1_DataGrid" sortableColumns="false" change="level1var.checkForChanges()" keyDown="myOnKeyDown()">
I'm tracking the state of the CTRL key and I'm okay with the results except when it comes to key combinations.
Press the CTRL key and you'll see it traces "CTRL on". Release it and you'll see it traces "CTRL off". No problem there. Now press CTRL and then press the C key (as in copy), now release C, then release the CTRL key and you see nothing traces.
i.e, if(Key.isDown(67)) is returning true................... (or)
if(Key.isDown(Key.CONTROL)) is returning true.........
but (Key.isDown(Key.CONTROL) and Key.isDown(67)) is not returning......