edit layer in silverlight code behind esri map - silverlight

I want change layer user able to edit layer:enter image description here
<esri:GraphicsLayer ShowLegend="false" ID="ResultsGraphicsLayer" />
<esri:GraphicsLayer ShowLegend="false" ID="MyGraphicsLayer" />
<esri:GraphicsLayer ShowLegend="false" ID="MySelectionGraphicsLayer" MouseEnter="GraphicsLayer_MouseEnter" MouseLeave="GraphicsLayer_MouseLeave"/>
<esri:GraphicsLayer ShowLegend="false" ID="IdentifyIconGraphicsLayer"/>
</esri:Map>

Related

How to render videos with List in react-admin?

I have a question regarding react-admin. So I'm building this admin List which Hasura-graphQL. I am able to render Images with the ImageField component which I am using:
<ImageField label="Image" source="image" sortByOrder="DESC"/>
And which I have no problems rendering. But the issue comes when I need to render a video that comes in a URL from my graphQL schema. Something like this:
"video": "https://myappvideo.blob.core.windows.net/posts/post_93753139-524a-4c85-a0fc-d40b47bd95f5.mp4?se=2030-12-31&sp=rwdlac&sv=2018-03-28&ss=btf&srt=sco&sig=oeyHYsiWC79a1z7fcgsPPdJzeC499t%2BwPkbImcctpJE%3D",
"id": 471
},
{
"video": null,
"id": 493
},
{
"video": "https://myappvideo.blob.core.windows.net/posts/post_f9c59f2f-3d2e-4c63-ae1e-65e5324866ad.mp4?se=2030-12-31&sp=rwdlac&sv=2018-03-28&ss=btf&srt=sco&sig=oeyHYsiWC79a1z7fcgsPPdJzeC499t%2BwPkbImcctpJE%3D",
"id": 476
},[...]
How can render videos in my react-admin list? Something where I can show the videos and I can click and reproduce?
React-admin has a way to render Images but I can see something similar for videos.
Any help would be appreciated a lot!
EDIT
This is how I'm actually trying to make this work:
<Datagrid>
<TextField label="Post ID" source="id" sortByOrder="ASC" />
//I am using FileField for this, but it does not work
<FileField label="Content" source="video" rel="video" sortByOrder="ASC" />
<TextField label="Content Type" />
<UserSum source="id" />
<SimpleForm {...props} label="Flagged">
<ApproveData source="id" />
</SimpleForm>
<DateField label="Posted On" source="createdAt" showTime />
<PostListActionToolbar>
<ShowButton label="Details" color="secondary" />
<EditButton label="Archive" color="secondary" />
</PostListActionToolbar>
</Datagrid>
Ok, I just figure out how to do this. Indeed react-admin does not have a way to render videos. So in this case you'll have to create your own component.
Step 1
Is to create the function:
const VideoField = (props) => {
const record = useRecordContext(props);
return <video src={`${record.video}`} controls width="320" height="240"></video>;
}
In this case, you'll have to interpolate the video record inside the video tag. I added the controls and the width and height to add more view on the video
Step 2
You can add a default label into it like this:
VideoField.defaultProps = { label: 'Video' };
This is necessary since it will label your content on the top side of the list.
Step 3
Then add your function in to a component inside the datagrid and you'll be having something like this:
Add it like this on your datagrid
<Datagrid>
<TextField label="Post ID" source="id" sortByOrder="ASC" />
<VideoField source="video" />
<TextField label="Content Type" />
</Datagrid>

How to change column title datagrid?

How to change column title datagrid ?
I need to change the caption of the columns, but I'm not getting.
The Code:
<List title="Todos Usuários" {...props}>
<Datagrid>
<TextField title="Codigo" --> not worked source="id" />
<TextField source="name" />
<EmailField source="email" />
</Datagrid>
</List>
Use label instead of title, but it is correct to use translation files to automatically get the required field labels: "Translating Resource and Field Names": https://marmelab.com/react-admin/Translation.html

How to vertically center align my form container in openui5

Hi I am relatively new to openui5. I am designing a login page. My form is designed with "responsive grid layout". In my form component I have a single "FormContainer". I want that container to be vertically center without any effect to my responsive design.
The following is the current screen shot:-
The code of my xml is as below:-
<mvc:View
xmlns:mvc="sap.ui.core.mvc"
xmlns:l="sap.ui.layout"
xmlns:f="sap.ui.layout.form"
xmlns:core="sap.ui.core"
xmlns="sap.m" >
<VBox class="sapUiSmallMargin" >
<f:Form id="Form"
editable="true"
ariaLabelledBy="Title1">
<f:layout>
<f:ResponsiveGridLayout />
</f:layout>
<f:formContainers>
<f:FormContainer ariaLabelledBy="Title2" >
<f:formElements>
<f:FormElement >
<f:fields>
<Image
src="icons/user.jpg"
densityAware="false"
width="60px" >
<layoutData>
<l:GridData span="L1 M1 S1" />
</layoutData>
</Image>
<Input value="{SupplierName}" id="name">
<layoutData>
<l:GridData span="L11 M11 S11" />
</layoutData>
</Input>
</f:fields>
</f:FormElement>
<f:FormElement >
<f:fields>
<Image
src="icons/password.jpg"
densityAware="false"
width="60px" >
<layoutData>
<l:GridData span="L1 M1 S1" linebreak="true" />
</layoutData>
</Image>
<Input value="{Street}" >
<layoutData>
<l:GridData span="L11 M11 S11" />
</layoutData>
</Input>
</f:fields>
</f:FormElement>
</f:formElements>
</f:FormContainer>
</f:formContainers>
</f:Form>
</VBox>
So kindly help me achieving this. How to vertically center the white box in the browser without effecting the responsiveness of the form?
You can center align the VBox by providing it height and using the property - justifyContent: center;
<VBox class="sapUiSmallMargin" height='100%' justifyContent ='Center'>
<!-- rest of the code remains same. -->

Images are not displayed on the buttons

I use the Fluent Ribbon (fluent.codeplex.com). I want to arrange four buttons side by side.
I use the following code:
<Fluent:RibbonGroupBox Header="Some Header">
<Fluent:RibbonToolBar>
<Fluent:RibbonToolBar.LayoutDefinitions>
<Fluent:RibbonToolBarLayoutDefinition Size="Small">
<Fluent:RibbonToolBarRow>
<Fluent:RibbonToolBarControlGroupDefinition>
<Fluent:RibbonToolBarControlDefinition Target="buttonFirst" />
<Fluent:RibbonToolBarControlDefinition Target="buttonPrevious" />
<Fluent:RibbonToolBarControlDefinition Target="buttonNext" />
<Fluent:RibbonToolBarControlDefinition Target="buttonLast" />
</Fluent:RibbonToolBarControlGroupDefinition>
</Fluent:RibbonToolBarRow>
</Fluent:RibbonToolBarLayoutDefinition>
</Fluent:RibbonToolBar.LayoutDefinitions>
<Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/First_16.png" x:Name="buttonFirst" />
<Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/Previous_16.png" x:Name="buttonPrevious" />
<Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/Next_16.png" x:Name="buttonNext" />
<Fluent:Button Size="Small" Icon="/WpfApplication1;component/Resources/Last_16.png" x:Name="buttonLast" />
</Fluent:RibbonToolBar>
</Fluent:RibbonGroupBox>
The buttons are aligned correctly, but the buttons don't have a image. Where is the problem?
(The image files are available)
Sometimes you need to change 'Copy to Output Directory" setting. I usually use 'Always'. Or IfNewer if you have a lot and don't want a rebuild to constantly wipe and recopy.

How to know when a XAML element is finished loading

I have a custom control I'm developing that has a collection of items. When adding an item to the collection you're meant to do:
myCustomControl.BeginAddItems();
myCustomControl.Items.Add("a");
myCustomControl.Items.Add("b");
myCustomControl.Items.Add("c");
myCustomControl.EndAddItems();
If defining in XAML it would be:
<MyControl>
<Items>
<Item Name="a" />
<Item Name="b" />
<Item Name="c" />
</Items>
</MyControl>
How can I have EndAddItems (and ideally BeginAddItems) called when loading from XAML? Is there any way that MyControl can be notified by XAML that it has finished loading?
You can use the Loaded event

Resources